Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
7d7bb19c
Commit
7d7bb19c
authored
Oct 02, 2003
by
Stephen Lord
Browse files
Options
Browse Files
Download
Plain Diff
Merge kernel.bkbits.net:/home/repos/linux-2.5
into kernel.bkbits.net:/home/lord/xfs-2.6
parents
d302b497
e818fc95
Changes
25
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
85 additions
and
295 deletions
+85
-295
fs/xfs/linux/xfs_super.c
fs/xfs/linux/xfs_super.c
+2
-2
fs/xfs/linux/xfs_vnode.h
fs/xfs/linux/xfs_vnode.h
+0
-1
fs/xfs/pagebuf/page_buf.h
fs/xfs/pagebuf/page_buf.h
+0
-3
fs/xfs/quota/xfs_dquot.c
fs/xfs/quota/xfs_dquot.c
+4
-4
fs/xfs/xfs_attr_fetch.c
fs/xfs/xfs_attr_fetch.c
+0
-100
fs/xfs/xfs_buf.h
fs/xfs/xfs_buf.h
+4
-1
fs/xfs/xfs_buf_item.c
fs/xfs/xfs_buf_item.c
+4
-4
fs/xfs/xfs_da_btree.c
fs/xfs/xfs_da_btree.c
+2
-2
fs/xfs/xfs_da_btree.h
fs/xfs/xfs_da_btree.h
+1
-1
fs/xfs/xfs_error.c
fs/xfs/xfs_error.c
+2
-1
fs/xfs/xfs_error.h
fs/xfs/xfs_error.h
+2
-2
fs/xfs/xfs_inode.c
fs/xfs/xfs_inode.c
+3
-2
fs/xfs/xfs_log.c
fs/xfs/xfs_log.c
+21
-22
fs/xfs/xfs_log.h
fs/xfs/xfs_log.h
+4
-4
fs/xfs/xfs_log_priv.h
fs/xfs/xfs_log_priv.h
+1
-1
fs/xfs/xfs_log_recover.c
fs/xfs/xfs_log_recover.c
+5
-8
fs/xfs/xfs_mount.c
fs/xfs/xfs_mount.c
+4
-4
fs/xfs/xfs_mount.h
fs/xfs/xfs_mount.h
+3
-3
fs/xfs/xfs_rw.c
fs/xfs/xfs_rw.c
+2
-3
fs/xfs/xfs_trans.h
fs/xfs/xfs_trans.h
+0
-1
fs/xfs/xfs_trans_buf.c
fs/xfs/xfs_trans_buf.c
+3
-3
fs/xfs/xfs_trans_inode.c
fs/xfs/xfs_trans_inode.c
+0
-100
fs/xfs/xfs_vfsops.c
fs/xfs/xfs_vfsops.c
+4
-6
fs/xfs/xfs_vnodeops.c
fs/xfs/xfs_vnodeops.c
+1
-2
fs/xfs/xfsidbg.c
fs/xfs/xfsidbg.c
+13
-15
No files found.
fs/xfs/linux/xfs_super.c
View file @
7d7bb19c
...
@@ -315,8 +315,8 @@ xfs_setsize_buftarg(
...
@@ -315,8 +315,8 @@ xfs_setsize_buftarg(
if
(
set_blocksize
(
btp
->
pbr_bdev
,
sectorsize
))
{
if
(
set_blocksize
(
btp
->
pbr_bdev
,
sectorsize
))
{
printk
(
KERN_WARNING
printk
(
KERN_WARNING
"XFS: Cannot set_blocksize to %u on device %
u:%u
\n
"
,
"XFS: Cannot set_blocksize to %u on device %
s
\n
"
,
sectorsize
,
MAJOR
(
btp
->
pbr_dev
),
MINOR
(
btp
->
pbr_dev
));
sectorsize
,
XFS_BUFTARG_NAME
(
btp
));
}
}
}
}
...
...
fs/xfs/linux/xfs_vnode.h
View file @
7d7bb19c
...
@@ -378,7 +378,6 @@ typedef struct vattr {
...
@@ -378,7 +378,6 @@ typedef struct vattr {
mode_t
va_mode
;
/* file access mode */
mode_t
va_mode
;
/* file access mode */
uid_t
va_uid
;
/* owner user id */
uid_t
va_uid
;
/* owner user id */
gid_t
va_gid
;
/* owner group id */
gid_t
va_gid
;
/* owner group id */
xfs_dev_t
va_fsid
;
/* file system id (dev for now) */
xfs_ino_t
va_nodeid
;
/* node id */
xfs_ino_t
va_nodeid
;
/* node id */
nlink_t
va_nlink
;
/* number of references to file */
nlink_t
va_nlink
;
/* number of references to file */
xfs_off_t
va_size
;
/* file size in bytes */
xfs_off_t
va_size
;
/* file size in bytes */
...
...
fs/xfs/pagebuf/page_buf.h
View file @
7d7bb19c
...
@@ -136,9 +136,6 @@ typedef enum page_buf_flags_e { /* pb_flags values */
...
@@ -136,9 +136,6 @@ typedef enum page_buf_flags_e { /* pb_flags values */
#define PBF_NOT_DONE(pb) (((pb)->pb_flags & (PBF_PARTIAL|PBF_NONE)) != 0)
#define PBF_NOT_DONE(pb) (((pb)->pb_flags & (PBF_PARTIAL|PBF_NONE)) != 0)
#define PBF_DONE(pb) (((pb)->pb_flags & (PBF_PARTIAL|PBF_NONE)) == 0)
#define PBF_DONE(pb) (((pb)->pb_flags & (PBF_PARTIAL|PBF_NONE)) == 0)
#define PBR_SECTOR_ONLY 1
/* only use sector size buffer heads */
#define PBR_ALIGNED_ONLY 2
/* only use aligned I/O */
typedef
struct
pb_target
{
typedef
struct
pb_target
{
dev_t
pbr_dev
;
dev_t
pbr_dev
;
struct
block_device
*
pbr_bdev
;
struct
block_device
*
pbr_bdev
;
...
...
fs/xfs/quota/xfs_dquot.c
View file @
7d7bb19c
...
@@ -87,9 +87,9 @@
...
@@ -87,9 +87,9 @@
STATIC
void
xfs_qm_dqflush_done
(
xfs_buf_t
*
,
xfs_dq_logitem_t
*
);
STATIC
void
xfs_qm_dqflush_done
(
xfs_buf_t
*
,
xfs_dq_logitem_t
*
);
#ifdef DEBUG
#ifdef DEBUG
dev_t
xfs_dqerror_dev
=
0
;
xfs_buftarg_t
*
xfs_dqerror_target
;
int
xfs_do_dqerror
=
0
;
int
xfs_do_dqerror
;
int
xfs_dqreq_num
=
0
;
int
xfs_dqreq_num
;
int
xfs_dqerror_mod
=
33
;
int
xfs_dqerror_mod
=
33
;
#endif
#endif
...
@@ -911,7 +911,7 @@ xfs_qm_dqget(
...
@@ -911,7 +911,7 @@ xfs_qm_dqget(
#ifdef DEBUG
#ifdef DEBUG
if
(
xfs_do_dqerror
)
{
if
(
xfs_do_dqerror
)
{
if
((
xfs_dqerror_
dev
==
mp
->
m_dev
)
&&
if
((
xfs_dqerror_
target
==
mp
->
m_ddev_targp
)
&&
(
xfs_dqreq_num
++
%
xfs_dqerror_mod
)
==
0
)
{
(
xfs_dqreq_num
++
%
xfs_dqerror_mod
)
==
0
)
{
cmn_err
(
CE_DEBUG
,
"Returning error in dqget"
);
cmn_err
(
CE_DEBUG
,
"Returning error in dqget"
);
return
(
EIO
);
return
(
EIO
);
...
...
fs/xfs/xfs_attr_fetch.c
deleted
100644 → 0
View file @
d302b497
/*
* Copyright (c) 2000, 2002 Silicon Graphics, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* Further, this software is distributed without any warranty that it is
* free of the rightful claim of any third person regarding infringement
* or the like. Any license provided herein, whether implied or
* otherwise, applies only to this software file. Patent licenses, if
* any, provided herein do not apply to combinations of this program with
* other software, or any other product whatsoever.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
* Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
* Mountain View, CA 94043, or:
*
* http://www.sgi.com
*
* For further information regarding this notice, see:
*
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/
#include "xfs.h"
#include "xfs_macros.h"
#include "xfs_types.h"
#include "xfs_inum.h"
#include "xfs_log.h"
#include "xfs_trans.h"
#include "xfs_sb.h"
#include "xfs_ag.h"
#include "xfs_dir.h"
#include "xfs_dir2.h"
#include "xfs_dmapi.h"
#include "xfs_mount.h"
#include "xfs_alloc_btree.h"
#include "xfs_bmap_btree.h"
#include "xfs_ialloc_btree.h"
#include "xfs_itable.h"
#include "xfs_btree.h"
#include "xfs_ialloc.h"
#include "xfs_alloc.h"
#include "xfs_attr_sf.h"
#include "xfs_dir_sf.h"
#include "xfs_dir2_sf.h"
#include "xfs_dinode.h"
#include "xfs_inode_item.h"
#include "xfs_inode.h"
#include "xfs_bmap.h"
#include "xfs_da_btree.h"
#include "xfs_attr.h"
#include "xfs_attr_leaf.h"
int
xfs_attr_fetch
(
xfs_inode_t
*
ip
,
char
*
name
,
char
*
value
,
int
valuelen
)
{
xfs_da_args_t
args
;
int
error
;
if
(
XFS_IFORK_Q
(
ip
)
==
0
)
return
ENOATTR
;
/*
* Do the argument setup for the xfs_attr routines.
*/
memset
((
char
*
)
&
args
,
0
,
sizeof
(
args
));
args
.
dp
=
ip
;
args
.
flags
=
ATTR_ROOT
;
args
.
whichfork
=
XFS_ATTR_FORK
;
args
.
name
=
name
;
args
.
namelen
=
strlen
(
name
);
args
.
value
=
value
;
args
.
valuelen
=
valuelen
;
args
.
hashval
=
xfs_da_hashname
(
args
.
name
,
args
.
namelen
);
args
.
oknoent
=
1
;
/*
* Decide on what work routines to call based on the inode size.
*/
if
(
args
.
dp
->
i_d
.
di_aformat
==
XFS_DINODE_FMT_LOCAL
)
error
=
xfs_attr_shortform_getvalue
(
&
args
);
else
if
(
xfs_bmap_one_block
(
args
.
dp
,
XFS_ATTR_FORK
))
error
=
xfs_attr_leaf_get
(
&
args
);
else
error
=
xfs_attr_node_get
(
&
args
);
if
(
error
==
EEXIST
)
error
=
0
;
return
(
error
);
}
fs/xfs/xfs_buf.h
View file @
7d7bb19c
...
@@ -194,7 +194,10 @@ extern inline xfs_caddr_t xfs_buf_offset(page_buf_t *bp, size_t offset)
...
@@ -194,7 +194,10 @@ extern inline xfs_caddr_t xfs_buf_offset(page_buf_t *bp, size_t offset)
(bp)->pb_target = (target)
(bp)->pb_target = (target)
#define XFS_BUF_TARGET(bp) ((bp)->pb_target)
#define XFS_BUF_TARGET(bp) ((bp)->pb_target)
#define XFS_BUF_TARGET_DEV(bp) ((bp)->pb_target->pbr_dev)
#define XFS_BUFTARG_NAME(target) \
({ char __b[BDEVNAME_SIZE]; bdevname((target->pbr_bdev), __b); __b; })
#define XFS_BUF_SET_VTYPE_REF(bp, type, ref)
#define XFS_BUF_SET_VTYPE_REF(bp, type, ref)
#define XFS_BUF_SET_VTYPE(bp, type)
#define XFS_BUF_SET_VTYPE(bp, type)
#define XFS_BUF_SET_REF(bp, ref)
#define XFS_BUF_SET_REF(bp, ref)
...
...
fs/xfs/xfs_buf_item.c
View file @
7d7bb19c
...
@@ -1007,7 +1007,7 @@ xfs_buf_iodone_callbacks(
...
@@ -1007,7 +1007,7 @@ xfs_buf_iodone_callbacks(
{
{
xfs_log_item_t
*
lip
;
xfs_log_item_t
*
lip
;
static
ulong
lasttime
;
static
ulong
lasttime
;
static
dev_t
lastdev
;
static
xfs_buftarg_t
*
lasttarg
;
xfs_mount_t
*
mp
;
xfs_mount_t
*
mp
;
ASSERT
(
XFS_BUF_FSPRIVATE
(
bp
,
void
*
)
!=
NULL
);
ASSERT
(
XFS_BUF_FSPRIVATE
(
bp
,
void
*
)
!=
NULL
);
...
@@ -1045,15 +1045,15 @@ xfs_buf_iodone_callbacks(
...
@@ -1045,15 +1045,15 @@ xfs_buf_iodone_callbacks(
return
;
return
;
}
}
if
((
XFS_BUF_TARGET
_DEV
(
bp
)
!=
lastdev
)
||
if
((
XFS_BUF_TARGET
(
bp
)
!=
lasttarg
)
||
(
time_after
(
jiffies
,
(
lasttime
+
5
*
HZ
))))
{
(
time_after
(
jiffies
,
(
lasttime
+
5
*
HZ
))))
{
lasttime
=
jiffies
;
lasttime
=
jiffies
;
prdev
(
"XFS write error in file system meta-data "
prdev
(
"XFS write error in file system meta-data "
"block 0x%Lx in %s"
,
"block 0x%Lx in %s"
,
XFS_BUF_TARGET
_DEV
(
bp
),
XFS_BUF_TARGET
(
bp
),
XFS_BUF_ADDR
(
bp
),
mp
->
m_fsname
);
XFS_BUF_ADDR
(
bp
),
mp
->
m_fsname
);
}
}
last
dev
=
XFS_BUF_TARGET_DEV
(
bp
);
last
targ
=
XFS_BUF_TARGET
(
bp
);
if
(
XFS_BUF_ISASYNC
(
bp
))
{
if
(
XFS_BUF_ISASYNC
(
bp
))
{
/*
/*
...
...
fs/xfs/xfs_da_btree.c
View file @
7d7bb19c
...
@@ -2450,7 +2450,7 @@ xfs_da_buf_make(int nbuf, xfs_buf_t **bps, inst_t *ra)
...
@@ -2450,7 +2450,7 @@ xfs_da_buf_make(int nbuf, xfs_buf_t **bps, inst_t *ra)
dabuf
->
dirty
=
0
;
dabuf
->
dirty
=
0
;
#ifdef XFS_DABUF_DEBUG
#ifdef XFS_DABUF_DEBUG
dabuf
->
ra
=
ra
;
dabuf
->
ra
=
ra
;
dabuf
->
dev
=
XFS_BUF_TARGET_DEV
(
bps
[
0
]);
dabuf
->
target
=
XFS_BUF_TARGET
(
bps
[
0
]);
dabuf
->
blkno
=
XFS_BUF_ADDR
(
bps
[
0
]);
dabuf
->
blkno
=
XFS_BUF_ADDR
(
bps
[
0
]);
#endif
#endif
if
(
nbuf
==
1
)
{
if
(
nbuf
==
1
)
{
...
@@ -2480,7 +2480,7 @@ xfs_da_buf_make(int nbuf, xfs_buf_t **bps, inst_t *ra)
...
@@ -2480,7 +2480,7 @@ xfs_da_buf_make(int nbuf, xfs_buf_t **bps, inst_t *ra)
s
=
mutex_spinlock
(
&
xfs_dabuf_global_lock
);
s
=
mutex_spinlock
(
&
xfs_dabuf_global_lock
);
for
(
p
=
xfs_dabuf_global_list
;
p
;
p
=
p
->
next
)
{
for
(
p
=
xfs_dabuf_global_list
;
p
;
p
=
p
->
next
)
{
ASSERT
(
p
->
blkno
!=
dabuf
->
blkno
||
ASSERT
(
p
->
blkno
!=
dabuf
->
blkno
||
p
->
dev
!=
dabuf
->
dev
);
p
->
target
!=
dabuf
->
target
);
}
}
dabuf
->
prev
=
NULL
;
dabuf
->
prev
=
NULL
;
if
(
xfs_dabuf_global_list
)
if
(
xfs_dabuf_global_list
)
...
...
fs/xfs/xfs_da_btree.h
View file @
7d7bb19c
...
@@ -212,7 +212,7 @@ typedef struct xfs_dabuf {
...
@@ -212,7 +212,7 @@ typedef struct xfs_dabuf {
inst_t
*
ra
;
/* return address of caller to make */
inst_t
*
ra
;
/* return address of caller to make */
struct
xfs_dabuf
*
next
;
/* next in global chain */
struct
xfs_dabuf
*
next
;
/* next in global chain */
struct
xfs_dabuf
*
prev
;
/* previous in global chain */
struct
xfs_dabuf
*
prev
;
/* previous in global chain */
dev_t
dev
;
/* device for buffer */
struct
xfs_buftarg
*
target
;
/* device for buffer */
xfs_daddr_t
blkno
;
/* daddr first in bps[0] */
xfs_daddr_t
blkno
;
/* daddr first in bps[0] */
#endif
#endif
struct
xfs_buf
*
bps
[
1
];
/* actually nbuf of these */
struct
xfs_buf
*
bps
[
1
];
/* actually nbuf of these */
...
...
fs/xfs/xfs_error.c
View file @
7d7bb19c
...
@@ -329,6 +329,7 @@ xfs_corruption_error(
...
@@ -329,6 +329,7 @@ xfs_corruption_error(
int
linenum
,
int
linenum
,
inst_t
*
ra
)
inst_t
*
ra
)
{
{
xfs_hex_dump
(
p
,
16
);
if
(
level
<=
xfs_error_level
)
xfs_hex_dump
(
p
,
16
);
xfs_error_report
(
tag
,
level
,
mp
,
fname
,
linenum
,
ra
);
xfs_error_report
(
tag
,
level
,
mp
,
fname
,
linenum
,
ra
);
}
}
fs/xfs/xfs_error.h
View file @
7d7bb19c
...
@@ -32,8 +32,8 @@
...
@@ -32,8 +32,8 @@
#ifndef __XFS_ERROR_H__
#ifndef __XFS_ERROR_H__
#define __XFS_ERROR_H__
#define __XFS_ERROR_H__
#define prdev(fmt,
dev
,args...) \
#define prdev(fmt,
targ
,args...) \
printk("XFS: device %
u:%u- " fmt "\n", MAJOR(dev), MINOR(dev
), ## args)
printk("XFS: device %
s- " fmt "\n", XFS_BUFTARG_NAME(targ
), ## args)
#define XFS_ERECOVER 1
/* Failure to recover log */
#define XFS_ERECOVER 1
/* Failure to recover log */
#define XFS_ELOGSTAT 2
/* Failure to stat log in user space */
#define XFS_ELOGSTAT 2
/* Failure to stat log in user space */
...
...
fs/xfs/xfs_inode.c
View file @
7d7bb19c
...
@@ -408,8 +408,9 @@ xfs_itobp(
...
@@ -408,8 +408,9 @@ xfs_itobp(
if
(
unlikely
(
XFS_TEST_ERROR
(
!
di_ok
,
mp
,
XFS_ERRTAG_ITOBP_INOTOBP
,
if
(
unlikely
(
XFS_TEST_ERROR
(
!
di_ok
,
mp
,
XFS_ERRTAG_ITOBP_INOTOBP
,
XFS_RANDOM_ITOBP_INOTOBP
)))
{
XFS_RANDOM_ITOBP_INOTOBP
)))
{
#ifdef DEBUG
#ifdef DEBUG
prdev
(
"bad inode magic/vsn daddr 0x%llx #%d (magic=%x)"
,
prdev
(
"bad inode magic/vsn daddr %lld #%d (magic=%x)"
,
mp
->
m_dev
,
(
unsigned
long
long
)
imap
.
im_blkno
,
i
,
mp
->
m_ddev_targp
,
(
unsigned
long
long
)
imap
.
im_blkno
,
i
,
INT_GET
(
dip
->
di_core
.
di_magic
,
ARCH_CONVERT
));
INT_GET
(
dip
->
di_core
.
di_magic
,
ARCH_CONVERT
));
#endif
#endif
XFS_CORRUPTION_ERROR
(
"xfs_itobp"
,
XFS_ERRLEVEL_HIGH
,
XFS_CORRUPTION_ERROR
(
"xfs_itobp"
,
XFS_ERRLEVEL_HIGH
,
...
...
fs/xfs/xfs_log.c
View file @
7d7bb19c
...
@@ -65,7 +65,7 @@ STATIC int xlog_bdstrat_cb(struct xfs_buf *);
...
@@ -65,7 +65,7 @@ STATIC int xlog_bdstrat_cb(struct xfs_buf *);
STATIC
int
xlog_commit_record
(
xfs_mount_t
*
mp
,
xlog_ticket_t
*
ticket
,
STATIC
int
xlog_commit_record
(
xfs_mount_t
*
mp
,
xlog_ticket_t
*
ticket
,
xlog_in_core_t
**
,
xfs_lsn_t
*
);
xlog_in_core_t
**
,
xfs_lsn_t
*
);
STATIC
xlog_t
*
xlog_alloc_log
(
xfs_mount_t
*
mp
,
STATIC
xlog_t
*
xlog_alloc_log
(
xfs_mount_t
*
mp
,
dev_t
log_dev
,
xfs_buftarg_t
*
log_target
,
xfs_daddr_t
blk_offset
,
xfs_daddr_t
blk_offset
,
int
num_bblks
);
int
num_bblks
);
STATIC
int
xlog_space_left
(
xlog_t
*
log
,
int
cycle
,
int
bytes
);
STATIC
int
xlog_space_left
(
xlog_t
*
log
,
int
cycle
,
int
bytes
);
...
@@ -155,7 +155,7 @@ int xlog_error_mod = 33;
...
@@ -155,7 +155,7 @@ int xlog_error_mod = 33;
*/
*/
#if defined(XLOG_NOLOG) || defined(DEBUG)
#if defined(XLOG_NOLOG) || defined(DEBUG)
int
xlog_debug
=
1
;
int
xlog_debug
=
1
;
dev_t
xlog_devt
=
0
;
xfs_buftarg_t
*
xlog_target
;
#endif
#endif
#if defined(XFS_LOG_TRACE)
#if defined(XFS_LOG_TRACE)
...
@@ -274,7 +274,7 @@ xfs_log_done(xfs_mount_t *mp,
...
@@ -274,7 +274,7 @@ xfs_log_done(xfs_mount_t *mp,
xfs_lsn_t
lsn
=
0
;
xfs_lsn_t
lsn
=
0
;
#if defined(DEBUG) || defined(XLOG_NOLOG)
#if defined(DEBUG) || defined(XLOG_NOLOG)
if
(
!
xlog_debug
&&
xlog_devt
==
log
->
l_dev
)
if
(
!
xlog_debug
&&
xlog_target
==
log
->
l_targ
)
return
0
;
return
0
;
#endif
#endif
...
@@ -339,7 +339,7 @@ xfs_log_force(xfs_mount_t *mp,
...
@@ -339,7 +339,7 @@ xfs_log_force(xfs_mount_t *mp,
xlog_t
*
log
=
mp
->
m_log
;
xlog_t
*
log
=
mp
->
m_log
;
#if defined(DEBUG) || defined(XLOG_NOLOG)
#if defined(DEBUG) || defined(XLOG_NOLOG)
if
(
!
xlog_debug
&&
xlog_devt
==
log
->
l_dev
)
if
(
!
xlog_debug
&&
xlog_target
==
log
->
l_targ
)
return
0
;
return
0
;
#endif
#endif
...
@@ -378,7 +378,7 @@ xfs_log_notify(xfs_mount_t *mp, /* mount of partition */
...
@@ -378,7 +378,7 @@ xfs_log_notify(xfs_mount_t *mp, /* mount of partition */
int
abortflg
,
spl
;
int
abortflg
,
spl
;
#if defined(DEBUG) || defined(XLOG_NOLOG)
#if defined(DEBUG) || defined(XLOG_NOLOG)
if
(
!
xlog_debug
&&
xlog_devt
==
log
->
l_dev
)
if
(
!
xlog_debug
&&
xlog_target
==
log
->
l_targ
)
return
0
;
return
0
;
#endif
#endif
cb
->
cb_next
=
0
;
cb
->
cb_next
=
0
;
...
@@ -436,7 +436,7 @@ xfs_log_reserve(xfs_mount_t *mp,
...
@@ -436,7 +436,7 @@ xfs_log_reserve(xfs_mount_t *mp,
int
retval
;
int
retval
;
#if defined(DEBUG) || defined(XLOG_NOLOG)
#if defined(DEBUG) || defined(XLOG_NOLOG)
if
(
!
xlog_debug
&&
xlog_devt
==
log
->
l_dev
)
if
(
!
xlog_debug
&&
xlog_target
==
log
->
l_targ
)
return
0
;
return
0
;
#endif
#endif
retval
=
0
;
retval
=
0
;
...
@@ -472,7 +472,7 @@ xfs_log_reserve(xfs_mount_t *mp,
...
@@ -472,7 +472,7 @@ xfs_log_reserve(xfs_mount_t *mp,
* Mount a log filesystem
* Mount a log filesystem
*
*
* mp - ubiquitous xfs mount point structure
* mp - ubiquitous xfs mount point structure
* log_
dev - device number
of on-disk log device
* log_
target - buftarg
of on-disk log device
* blk_offset - Start block # where block size is 512 bytes (BBSIZE)
* blk_offset - Start block # where block size is 512 bytes (BBSIZE)
* num_bblocks - Number of BBSIZE blocks in on-disk log
* num_bblocks - Number of BBSIZE blocks in on-disk log
*
*
...
@@ -480,7 +480,7 @@ xfs_log_reserve(xfs_mount_t *mp,
...
@@ -480,7 +480,7 @@ xfs_log_reserve(xfs_mount_t *mp,
*/
*/
int
int
xfs_log_mount
(
xfs_mount_t
*
mp
,
xfs_log_mount
(
xfs_mount_t
*
mp
,
dev_t
log_dev
,
xfs_buftarg_t
*
log_target
,
xfs_daddr_t
blk_offset
,
xfs_daddr_t
blk_offset
,
int
num_bblks
)
int
num_bblks
)
{
{
...
@@ -493,12 +493,11 @@ xfs_log_mount(xfs_mount_t *mp,
...
@@ -493,12 +493,11 @@ xfs_log_mount(xfs_mount_t *mp,
ASSERT
(
XFS_MTOVFS
(
mp
)
->
vfs_flag
&
VFS_RDONLY
);
ASSERT
(
XFS_MTOVFS
(
mp
)
->
vfs_flag
&
VFS_RDONLY
);
}
}
mp
->
m_log
=
xlog_alloc_log
(
mp
,
log_
dev
,
blk_offset
,
num_bblks
);
mp
->
m_log
=
xlog_alloc_log
(
mp
,
log_
target
,
blk_offset
,
num_bblks
);
#if defined(DEBUG) || defined(XLOG_NOLOG)
#if defined(DEBUG) || defined(XLOG_NOLOG)
if
(
!
xlog_debug
)
{
if
(
!
xlog_debug
)
{
cmn_err
(
CE_NOTE
,
"log dev: %u:%u"
,
cmn_err
(
CE_NOTE
,
"log dev: %s"
,
XFS_BUFTARG_NAME
(
log_target
));
MAJOR
(
log_dev
),
MINOR
(
log_dev
));
return
0
;
return
0
;
}
}
#endif
#endif
...
@@ -606,7 +605,7 @@ xfs_log_unmount_write(xfs_mount_t *mp)
...
@@ -606,7 +605,7 @@ xfs_log_unmount_write(xfs_mount_t *mp)
}
magic
=
{
XLOG_UNMOUNT_TYPE
,
0
,
0
};
}
magic
=
{
XLOG_UNMOUNT_TYPE
,
0
,
0
};
#if defined(DEBUG) || defined(XLOG_NOLOG)
#if defined(DEBUG) || defined(XLOG_NOLOG)
if
(
!
xlog_debug
&&
xlog_devt
==
log
->
l_dev
)
if
(
!
xlog_debug
&&
xlog_target
==
log
->
l_targ
)
return
0
;
return
0
;
#endif
#endif
...
@@ -734,9 +733,9 @@ xfs_log_write(xfs_mount_t * mp,
...
@@ -734,9 +733,9 @@ xfs_log_write(xfs_mount_t * mp,
{
{
int
error
;
int
error
;
xlog_t
*
log
=
mp
->
m_log
;
xlog_t
*
log
=
mp
->
m_log
;
#if defined(DEBUG) || defined(XLOG_NOLOG)
if
(
!
xlog_debug
&&
xlog_devt
==
log
->
l_dev
)
{
#if defined(DEBUG) || defined(XLOG_NOLOG)
if
(
!
xlog_debug
&&
xlog_target
==
log
->
l_targ
)
{
*
start_lsn
=
0
;
*
start_lsn
=
0
;
return
0
;
return
0
;
}
}
...
@@ -761,7 +760,7 @@ xfs_log_move_tail(xfs_mount_t *mp,
...
@@ -761,7 +760,7 @@ xfs_log_move_tail(xfs_mount_t *mp,
SPLDECL
(
s
);
SPLDECL
(
s
);
#if defined(DEBUG) || defined(XLOG_NOLOG)
#if defined(DEBUG) || defined(XLOG_NOLOG)
if
(
!
xlog_debug
&&
xlog_
devt
==
log
->
l_dev
)
if
(
!
xlog_debug
&&
xlog_
target
==
log
->
l_targ
)
return
;
return
;
#endif
#endif
/* XXXsup tmp */
/* XXXsup tmp */
...
@@ -1059,14 +1058,14 @@ xlog_get_iclog_buffer_size(xfs_mount_t *mp,
...
@@ -1059,14 +1058,14 @@ xlog_get_iclog_buffer_size(xfs_mount_t *mp,
/*
/*
* When logbufs == 0, someone has disabled the log from the FSTAB
* When logbufs == 0, someone has disabled the log from the FSTAB
* file. This is not a documented feature. We need to set xlog_debug
* file. This is not a documented feature. We need to set xlog_debug
* to zero (this deactivates the log) and set xlog_
dev
t to the
* to zero (this deactivates the log) and set xlog_
targe
t to the
* appropriate dev_t. Only one filesystem may be affected as such
* appropriate dev_t. Only one filesystem may be affected as such
* since this is just a performance hack to test what we might be able
* since this is just a performance hack to test what we might be able
* to get if the log were not present.
* to get if the log were not present.
*/
*/
if
(
mp
->
m_logbufs
==
0
)
{
if
(
mp
->
m_logbufs
==
0
)
{
xlog_debug
=
0
;
xlog_debug
=
0
;
xlog_
devt
=
log
->
l_dev
;
xlog_
target
=
log
->
l_targ
;
log
->
l_iclog_bufs
=
XLOG_MIN_ICLOGS
;
log
->
l_iclog_bufs
=
XLOG_MIN_ICLOGS
;
}
else
}
else
#endif
#endif
...
@@ -1089,8 +1088,8 @@ xlog_get_iclog_buffer_size(xfs_mount_t *mp,
...
@@ -1089,8 +1088,8 @@ xlog_get_iclog_buffer_size(xfs_mount_t *mp,
#if defined(DEBUG) || defined(XLOG_NOLOG)
#if defined(DEBUG) || defined(XLOG_NOLOG)
/* We are reactivating a filesystem after it was active */
/* We are reactivating a filesystem after it was active */
if
(
log
->
l_
dev
==
xlog_dev
t
)
{
if
(
log
->
l_
targ
==
xlog_targe
t
)
{
xlog_
devt
=
1
;
xlog_
target
=
1
;
/* XXX(hch): WTF? */
xlog_debug
=
1
;
xlog_debug
=
1
;
}
}
#endif
#endif
...
@@ -1176,7 +1175,7 @@ xlog_get_iclog_buffer_size(xfs_mount_t *mp,
...
@@ -1176,7 +1175,7 @@ xlog_get_iclog_buffer_size(xfs_mount_t *mp,
*/
*/
STATIC
xlog_t
*
STATIC
xlog_t
*
xlog_alloc_log
(
xfs_mount_t
*
mp
,
xlog_alloc_log
(
xfs_mount_t
*
mp
,
dev_t
log_dev
,
xfs_buftarg_t
*
log_target
,
xfs_daddr_t
blk_offset
,
xfs_daddr_t
blk_offset
,
int
num_bblks
)
int
num_bblks
)
{
{
...
@@ -1191,7 +1190,7 @@ xlog_alloc_log(xfs_mount_t *mp,
...
@@ -1191,7 +1190,7 @@ xlog_alloc_log(xfs_mount_t *mp,
log
=
(
xlog_t
*
)
kmem_zalloc
(
sizeof
(
xlog_t
),
KM_SLEEP
);
log
=
(
xlog_t
*
)
kmem_zalloc
(
sizeof
(
xlog_t
),
KM_SLEEP
);
log
->
l_mp
=
mp
;
log
->
l_mp
=
mp
;
log
->
l_
dev
=
log_dev
;
log
->
l_
targ
=
log_target
;
log
->
l_logsize
=
BBTOB
(
num_bblks
);
log
->
l_logsize
=
BBTOB
(
num_bblks
);
log
->
l_logBBstart
=
blk_offset
;
log
->
l_logBBstart
=
blk_offset
;
log
->
l_logBBsize
=
num_bblks
;
log
->
l_logBBsize
=
num_bblks
;
...
...
fs/xfs/xfs_log.h
View file @
7d7bb19c
...
@@ -153,10 +153,10 @@ xfs_lsn_t xfs_log_done(struct xfs_mount *mp,
...
@@ -153,10 +153,10 @@ xfs_lsn_t xfs_log_done(struct xfs_mount *mp,
int
xfs_log_force
(
struct
xfs_mount
*
mp
,
int
xfs_log_force
(
struct
xfs_mount
*
mp
,
xfs_lsn_t
lsn
,
xfs_lsn_t
lsn
,
uint
flags
);
uint
flags
);
int
xfs_log_mount
(
struct
xfs_mount
*
mp
,
int
xfs_log_mount
(
struct
xfs_mount
*
mp
,
dev_t
log_dev
,
struct
xfs_buftarg
*
log_target
,
xfs_daddr_t
start_block
,
xfs_daddr_t
start_block
,
int
num_bblocks
);
int
num_bblocks
);
int
xfs_log_mount_finish
(
struct
xfs_mount
*
mp
,
int
);
int
xfs_log_mount_finish
(
struct
xfs_mount
*
mp
,
int
);
void
xfs_log_move_tail
(
struct
xfs_mount
*
mp
,
void
xfs_log_move_tail
(
struct
xfs_mount
*
mp
,
xfs_lsn_t
tail_lsn
);
xfs_lsn_t
tail_lsn
);
...
...
fs/xfs/xfs_log_priv.h
View file @
7d7bb19c
...
@@ -504,7 +504,7 @@ typedef struct log {
...
@@ -504,7 +504,7 @@ typedef struct log {
struct
xfs_mount
*
l_mp
;
/* mount point */
struct
xfs_mount
*
l_mp
;
/* mount point */
struct
xfs_buf
*
l_xbuf
;
/* extra buffer for log
struct
xfs_buf
*
l_xbuf
;
/* extra buffer for log
* wrapping */
* wrapping */
dev_t
l_dev
;
/* dev_t
of log */
struct
xfs_buftarg
*
l_targ
;
/* buftarg
of log */
xfs_daddr_t
l_logBBstart
;
/* start block of log */
xfs_daddr_t
l_logBBstart
;
/* start block of log */
int
l_logsize
;
/* size of log in bytes */
int
l_logsize
;
/* size of log in bytes */
int
l_logBBsize
;
/* size of log in BB chunks */
int
l_logBBsize
;
/* size of log in BB chunks */
...
...
fs/xfs/xfs_log_recover.c
View file @
7d7bb19c
...
@@ -2179,8 +2179,8 @@ xlog_recover_do_buffer_trans(
...
@@ -2179,8 +2179,8 @@ xlog_recover_do_buffer_trans(
break
;
break
;
default:
default:
xfs_fs_cmn_err
(
CE_ALERT
,
log
->
l_mp
,
xfs_fs_cmn_err
(
CE_ALERT
,
log
->
l_mp
,
"xfs_log_recover: unknown buffer type 0x%x, dev %
u:%u
"
,
"xfs_log_recover: unknown buffer type 0x%x, dev %
s
"
,
buf_f
->
blf_type
,
MAJOR
(
log
->
l_dev
),
MINOR
(
log
->
l_dev
));
buf_f
->
blf_type
,
XFS_BUFTARG_NAME
(
log
->
l_targ
));
XFS_ERROR_REPORT
(
"xlog_recover_do_buffer_trans"
,
XFS_ERROR_REPORT
(
"xlog_recover_do_buffer_trans"
,
XFS_ERRLEVEL_LOW
,
log
->
l_mp
);
XFS_ERRLEVEL_LOW
,
log
->
l_mp
);
return
XFS_ERROR
(
EFSCORRUPTED
);
return
XFS_ERROR
(
EFSCORRUPTED
);
...
@@ -3889,9 +3889,8 @@ xlog_recover(
...
@@ -3889,9 +3889,8 @@ xlog_recover(
}
}
cmn_err
(
CE_NOTE
,
cmn_err
(
CE_NOTE
,
"Starting XFS recovery on filesystem: %s (dev: %d/%d)"
,
"Starting XFS recovery on filesystem: %s (dev: %s)"
,
log
->
l_mp
->
m_fsname
,
MAJOR
(
log
->
l_dev
),
log
->
l_mp
->
m_fsname
,
XFS_BUFTARG_NAME
(
log
->
l_targ
));
MINOR
(
log
->
l_dev
));
error
=
xlog_do_recover
(
log
,
head_blk
,
tail_blk
);
error
=
xlog_do_recover
(
log
,
head_blk
,
tail_blk
);
log
->
l_flags
|=
XLOG_RECOVERY_NEEDED
;
log
->
l_flags
|=
XLOG_RECOVERY_NEEDED
;
...
@@ -3940,9 +3939,7 @@ xlog_recover_finish(
...
@@ -3940,9 +3939,7 @@ xlog_recover_finish(
cmn_err
(
CE_NOTE
,
cmn_err
(
CE_NOTE
,
"Ending XFS recovery on filesystem: %s (dev: %d/%d)"
,
"Ending XFS recovery on filesystem: %s (dev: %d/%d)"
,
log
->
l_mp
->
m_fsname
,
MAJOR
(
log
->
l_dev
),
log
->
l_mp
->
m_fsname
,
XFS_BUFTARG_NAME
(
log
->
l_targ
));
MINOR
(
log
->
l_dev
));
log
->
l_flags
&=
~
XLOG_RECOVERY_NEEDED
;
log
->
l_flags
&=
~
XLOG_RECOVERY_NEEDED
;
}
else
{
}
else
{
cmn_err
(
CE_DEBUG
,
cmn_err
(
CE_DEBUG
,
...
...
fs/xfs/xfs_mount.c
View file @
7d7bb19c
...
@@ -285,9 +285,9 @@ xfs_mount_validate_sb(
...
@@ -285,9 +285,9 @@ xfs_mount_validate_sb(
#if !XFS_BIG_BLKNOS
#if !XFS_BIG_BLKNOS
if
(
unlikely
(
if
(
unlikely
(
(
sbp
->
sb_dblocks
<<
(
__uint64_t
)(
sbp
->
sb_blocklog
-
BBSHIFT
))
(
sbp
->
sb_dblocks
<<
(
__uint64_t
)(
sbp
->
sb_blocklog
-
BBSHIFT
))
>
INT_MAX
||
>
U
INT_MAX
||
(
sbp
->
sb_rblocks
<<
(
__uint64_t
)(
sbp
->
sb_blocklog
-
BBSHIFT
))
(
sbp
->
sb_rblocks
<<
(
__uint64_t
)(
sbp
->
sb_blocklog
-
BBSHIFT
))
>
INT_MAX
))
{
>
U
INT_MAX
))
{
cmn_err
(
CE_WARN
,
cmn_err
(
CE_WARN
,
"XFS: File system is too large to be mounted on this system."
);
"XFS: File system is too large to be mounted on this system."
);
return
XFS_ERROR
(
E2BIG
);
return
XFS_ERROR
(
E2BIG
);
...
@@ -949,7 +949,7 @@ xfs_mountfs(
...
@@ -949,7 +949,7 @@ xfs_mountfs(
* log's mount-time initialization. Perform 1st part recovery if needed
* log's mount-time initialization. Perform 1st part recovery if needed
*/
*/
if
(
likely
(
sbp
->
sb_logblocks
>
0
))
{
/* check for volume case */
if
(
likely
(
sbp
->
sb_logblocks
>
0
))
{
/* check for volume case */
error
=
xfs_log_mount
(
mp
,
mp
->
m_logdev_targp
->
pbr_dev
,
error
=
xfs_log_mount
(
mp
,
mp
->
m_logdev_targp
,
XFS_FSB_TO_DADDR
(
mp
,
sbp
->
sb_logstart
),
XFS_FSB_TO_DADDR
(
mp
,
sbp
->
sb_logstart
),
XFS_FSB_TO_BB
(
mp
,
sbp
->
sb_logblocks
));
XFS_FSB_TO_BB
(
mp
,
sbp
->
sb_logblocks
));
if
(
error
)
{
if
(
error
)
{
...
@@ -980,7 +980,7 @@ xfs_mountfs(
...
@@ -980,7 +980,7 @@ xfs_mountfs(
if
(
unlikely
((
rip
->
i_d
.
di_mode
&
IFMT
)
!=
IFDIR
))
{
if
(
unlikely
((
rip
->
i_d
.
di_mode
&
IFMT
)
!=
IFDIR
))
{
cmn_err
(
CE_WARN
,
"XFS: corrupted root inode"
);
cmn_err
(
CE_WARN
,
"XFS: corrupted root inode"
);
prdev
(
"Root inode %llu is not a directory"
,
prdev
(
"Root inode %llu is not a directory"
,
mp
->
m_d
ev
,
(
unsigned
long
long
)
rip
->
i_ino
);
mp
->
m_d
dev_targp
,
(
unsigned
long
long
)
rip
->
i_ino
);
xfs_iunlock
(
rip
,
XFS_ILOCK_EXCL
);
xfs_iunlock
(
rip
,
XFS_ILOCK_EXCL
);
XFS_ERROR_REPORT
(
"xfs_mountfs_int(2)"
,
XFS_ERRLEVEL_LOW
,
XFS_ERROR_REPORT
(
"xfs_mountfs_int(2)"
,
XFS_ERRLEVEL_LOW
,
mp
);
mp
);
...
...
fs/xfs/xfs_mount.h
View file @
7d7bb19c
...
@@ -94,7 +94,7 @@ struct xfs_bmap_free;
...
@@ -94,7 +94,7 @@ struct xfs_bmap_free;
typedef
int
(
*
xfs_send_data_t
)(
int
,
struct
bhv_desc
*
,
typedef
int
(
*
xfs_send_data_t
)(
int
,
struct
bhv_desc
*
,
xfs_off_t
,
size_t
,
int
,
vrwlock_t
*
);
xfs_off_t
,
size_t
,
int
,
vrwlock_t
*
);
typedef
int
(
*
xfs_send_mmap_t
)(
struct
vm_area_struct
*
,
uint
);
typedef
int
(
*
xfs_send_mmap_t
)(
struct
vm_area_struct
*
,
uint
);
typedef
int
(
*
xfs_send_destroy_t
)(
struct
bhv_desc
*
,
dm_right_t
);
typedef
int
(
*
xfs_send_destroy_t
)(
struct
vnode
*
,
dm_right_t
);
typedef
int
(
*
xfs_send_namesp_t
)(
dm_eventtype_t
,
struct
vnode
*
,
typedef
int
(
*
xfs_send_namesp_t
)(
dm_eventtype_t
,
struct
vnode
*
,
dm_right_t
,
struct
vnode
*
,
dm_right_t
,
dm_right_t
,
struct
vnode
*
,
dm_right_t
,
char
*
,
char
*
,
mode_t
,
int
,
int
);
char
*
,
char
*
,
mode_t
,
int
,
int
);
...
@@ -113,8 +113,8 @@ typedef struct xfs_dmops {
...
@@ -113,8 +113,8 @@ typedef struct xfs_dmops {
(*(mp)->m_dm_ops.xfs_send_data)(ev,bdp,off,len,fl,lock)
(*(mp)->m_dm_ops.xfs_send_data)(ev,bdp,off,len,fl,lock)
#define XFS_SEND_MMAP(mp, vma,fl) \
#define XFS_SEND_MMAP(mp, vma,fl) \
(*(mp)->m_dm_ops.xfs_send_mmap)(vma,fl)
(*(mp)->m_dm_ops.xfs_send_mmap)(vma,fl)
#define XFS_SEND_DESTROY(mp,
bd
p,right) \
#define XFS_SEND_DESTROY(mp,
v
p,right) \
(*(mp)->m_dm_ops.xfs_send_destroy)(
bd
p,right)
(*(mp)->m_dm_ops.xfs_send_destroy)(
v
p,right)
#define XFS_SEND_NAMESP(mp, ev,b1,r1,b2,r2,n1,n2,mode,rval,fl) \
#define XFS_SEND_NAMESP(mp, ev,b1,r1,b2,r2,n1,n2,mode,rval,fl) \
(*(mp)->m_dm_ops.xfs_send_namesp)(ev,b1,r1,b2,r2,n1,n2,mode,rval,fl)
(*(mp)->m_dm_ops.xfs_send_namesp)(ev,b1,r1,b2,r2,n1,n2,mode,rval,fl)
#define XFS_SEND_UNMOUNT(mp, vfsp,vp,right,mode,rval,fl) \
#define XFS_SEND_UNMOUNT(mp, vfsp,vp,right,mode,rval,fl) \
...
...
fs/xfs/xfs_rw.c
View file @
7d7bb19c
...
@@ -260,11 +260,10 @@ xfs_ioerror_alert(
...
@@ -260,11 +260,10 @@ xfs_ioerror_alert(
xfs_daddr_t
blkno
)
xfs_daddr_t
blkno
)
{
{
cmn_err
(
CE_ALERT
,
cmn_err
(
CE_ALERT
,
"I/O error in filesystem (
\"
%s
\"
) meta-data dev %
u:%u
block 0x%llx"
"I/O error in filesystem (
\"
%s
\"
) meta-data dev %
s
block 0x%llx"
" (
\"
%s
\"
) error %d buf count %u"
,
" (
\"
%s
\"
) error %d buf count %u"
,
(
!
mp
||
!
mp
->
m_fsname
)
?
"(fs name not set)"
:
mp
->
m_fsname
,
(
!
mp
||
!
mp
->
m_fsname
)
?
"(fs name not set)"
:
mp
->
m_fsname
,
MAJOR
(
XFS_BUF_TARGET_DEV
(
bp
)),
XFS_BUFTARG_NAME
(
bp
->
pb_target
),
MINOR
(
XFS_BUF_TARGET_DEV
(
bp
)),
(
__uint64_t
)
blkno
,
(
__uint64_t
)
blkno
,
func
,
func
,
XFS_BUF_GETERROR
(
bp
),
XFS_BUF_GETERROR
(
bp
),
...
...
fs/xfs/xfs_trans.h
View file @
7d7bb19c
...
@@ -995,7 +995,6 @@ void xfs_trans_dquot_buf(xfs_trans_t *, struct xfs_buf *, uint);
...
@@ -995,7 +995,6 @@ void xfs_trans_dquot_buf(xfs_trans_t *, struct xfs_buf *, uint);
void
xfs_trans_inode_alloc_buf
(
xfs_trans_t
*
,
struct
xfs_buf
*
);
void
xfs_trans_inode_alloc_buf
(
xfs_trans_t
*
,
struct
xfs_buf
*
);
int
xfs_trans_iget
(
struct
xfs_mount
*
,
xfs_trans_t
*
,
int
xfs_trans_iget
(
struct
xfs_mount
*
,
xfs_trans_t
*
,
xfs_ino_t
,
uint
,
struct
xfs_inode
**
);
xfs_ino_t
,
uint
,
struct
xfs_inode
**
);
void
xfs_trans_iput
(
xfs_trans_t
*
,
struct
xfs_inode
*
,
uint
);
void
xfs_trans_ijoin
(
xfs_trans_t
*
,
struct
xfs_inode
*
,
uint
);
void
xfs_trans_ijoin
(
xfs_trans_t
*
,
struct
xfs_inode
*
,
uint
);
void
xfs_trans_ihold
(
xfs_trans_t
*
,
struct
xfs_inode
*
);
void
xfs_trans_ihold
(
xfs_trans_t
*
,
struct
xfs_inode
*
);
void
xfs_trans_ihold_release
(
xfs_trans_t
*
,
struct
xfs_inode
*
);
void
xfs_trans_ihold_release
(
xfs_trans_t
*
,
struct
xfs_inode
*
);
...
...
fs/xfs/xfs_trans_buf.c
View file @
7d7bb19c
...
@@ -264,7 +264,7 @@ xfs_trans_getsb(xfs_trans_t *tp,
...
@@ -264,7 +264,7 @@ xfs_trans_getsb(xfs_trans_t *tp,
}
}
#ifdef DEBUG
#ifdef DEBUG
dev_t
xfs_error_dev
=
0
;
xfs_buftarg_t
*
xfs_error_target
;
int
xfs_do_error
;
int
xfs_do_error
;
int
xfs_req_num
;
int
xfs_req_num
;
int
xfs_error_mod
=
33
;
int
xfs_error_mod
=
33
;
...
@@ -322,7 +322,7 @@ xfs_trans_read_buf(
...
@@ -322,7 +322,7 @@ xfs_trans_read_buf(
}
}
#ifdef DEBUG
#ifdef DEBUG
if
(
xfs_do_error
&&
(
bp
!=
NULL
))
{
if
(
xfs_do_error
&&
(
bp
!=
NULL
))
{
if
(
xfs_error_
dev
==
target
->
pbr_dev
)
{
if
(
xfs_error_
target
==
target
)
{
if
(((
xfs_req_num
++
)
%
xfs_error_mod
)
==
0
)
{
if
(((
xfs_req_num
++
)
%
xfs_error_mod
)
==
0
)
{
xfs_buf_relse
(
bp
);
xfs_buf_relse
(
bp
);
printk
(
"Returning error!
\n
"
);
printk
(
"Returning error!
\n
"
);
...
@@ -425,7 +425,7 @@ xfs_trans_read_buf(
...
@@ -425,7 +425,7 @@ xfs_trans_read_buf(
}
}
#ifdef DEBUG
#ifdef DEBUG
if
(
xfs_do_error
&&
!
(
tp
->
t_flags
&
XFS_TRANS_DIRTY
))
{
if
(
xfs_do_error
&&
!
(
tp
->
t_flags
&
XFS_TRANS_DIRTY
))
{
if
(
xfs_error_
dev
==
target
->
pbr_dev
)
{
if
(
xfs_error_
target
==
target
)
{
if
(((
xfs_req_num
++
)
%
xfs_error_mod
)
==
0
)
{
if
(((
xfs_req_num
++
)
%
xfs_error_mod
)
==
0
)
{
xfs_force_shutdown
(
tp
->
t_mountp
,
xfs_force_shutdown
(
tp
->
t_mountp
,
XFS_METADATA_IO_ERROR
);
XFS_METADATA_IO_ERROR
);
...
...
fs/xfs/xfs_trans_inode.c
View file @
7d7bb19c
...
@@ -187,106 +187,6 @@ xfs_trans_iget(
...
@@ -187,106 +187,6 @@ xfs_trans_iget(
}
}
/*
* Release the inode ip which was previously acquired with xfs_trans_iget()
* or added with xfs_trans_ijoin(). This will decrement the lock
* recursion count of the inode item. If the count goes to less than 0,
* the inode will be unlocked and disassociated from the transaction.
*
* If the inode has been modified within the transaction, it will not be
* unlocked until the transaction commits.
*/
void
xfs_trans_iput
(
xfs_trans_t
*
tp
,
xfs_inode_t
*
ip
,
uint
lock_flags
)
{
xfs_inode_log_item_t
*
iip
;
xfs_log_item_desc_t
*
lidp
;
/*
* If the transaction pointer is NULL, just call xfs_iput().
*/
if
(
tp
==
NULL
)
{
xfs_iput
(
ip
,
lock_flags
);
}
ASSERT
(
ip
->
i_transp
==
tp
);
iip
=
ip
->
i_itemp
;
ASSERT
(
iip
!=
NULL
);
/*
* Find the item descriptor pointing to this inode's
* log item. It must be there.
*/
lidp
=
xfs_trans_find_item
(
tp
,
(
xfs_log_item_t
*
)
iip
);
ASSERT
(
lidp
!=
NULL
);
ASSERT
(
lidp
->
lid_item
==
(
xfs_log_item_t
*
)
iip
);
/*
* Be consistent about the bookkeeping for the inode's
* io lock, but it doesn't mean much really.
*/
ASSERT
((
iip
->
ili_flags
&
XFS_ILI_IOLOCKED_ANY
)
!=
XFS_ILI_IOLOCKED_ANY
);
if
(
lock_flags
&
(
XFS_IOLOCK_EXCL
|
XFS_IOLOCK_SHARED
))
{
ASSERT
(
iip
->
ili_flags
&
XFS_ILI_IOLOCKED_ANY
);
ASSERT
((
!
(
lock_flags
&
XFS_IOLOCK_EXCL
))
||
(
iip
->
ili_flags
&
XFS_ILI_IOLOCKED_EXCL
));
ASSERT
((
!
(
lock_flags
&
XFS_IOLOCK_SHARED
))
||
(
iip
->
ili_flags
&
(
XFS_ILI_IOLOCKED_EXCL
|
XFS_ILI_IOLOCKED_SHARED
)));
if
(
iip
->
ili_iolock_recur
>
0
)
{
iip
->
ili_iolock_recur
--
;
}
}
/*
* If the release is just for a recursive lock on the inode lock,
* then decrement the count and return. We can assert that
* the caller is dropping an EXCL lock on the inode, because
* inode must be locked EXCL within transactions.
*/
ASSERT
(
lock_flags
&
XFS_ILOCK_EXCL
);
if
(
iip
->
ili_ilock_recur
>
0
)
{
iip
->
ili_ilock_recur
--
;
return
;
}
ASSERT
(
iip
->
ili_iolock_recur
==
0
);
/*
* If the inode was dirtied within this transaction, it cannot
* be released until the transaction commits.
*/
if
(
lidp
->
lid_flags
&
XFS_LID_DIRTY
)
{
return
;
}
xfs_trans_free_item
(
tp
,
lidp
);
/*
* Clear the hold and iolocked flags in the inode log item.
* We wouldn't want the next user of the inode to
* get confused. Assert that if the iolocked flag is set
* in the item then we are unlocking it in the call to xfs_iput()
* below.
*/
ASSERT
((
!
(
iip
->
ili_flags
&
XFS_ILI_IOLOCKED_ANY
))
||
(
lock_flags
&
(
XFS_IOLOCK_EXCL
|
XFS_IOLOCK_SHARED
)));
if
(
iip
->
ili_flags
&
(
XFS_ILI_HOLD
|
XFS_ILI_IOLOCKED_ANY
))
{
iip
->
ili_flags
&=
~
(
XFS_ILI_HOLD
|
XFS_ILI_IOLOCKED_ANY
);
}
/*
* Unlike xfs_brelse() the inode log item cannot be
* freed, because it is embedded within the inode.
* All we have to do is release the inode.
*/
xfs_iput
(
ip
,
lock_flags
);
return
;
}
/*
/*
* Add the locked inode to the transaction.
* Add the locked inode to the transaction.
* The inode must be locked, and it cannot be associated with any
* The inode must be locked, and it cannot be associated with any
...
...
fs/xfs/xfs_vfsops.c
View file @
7d7bb19c
...
@@ -1776,7 +1776,6 @@ xfs_showargs(
...
@@ -1776,7 +1776,6 @@ xfs_showargs(
};
};
struct
proc_xfs_info
*
xfs_infop
;
struct
proc_xfs_info
*
xfs_infop
;
struct
xfs_mount
*
mp
=
XFS_BHVTOM
(
bhv
);
struct
xfs_mount
*
mp
=
XFS_BHVTOM
(
bhv
);
char
b
[
BDEVNAME_SIZE
];
for
(
xfs_infop
=
xfs_info
;
xfs_infop
->
flag
;
xfs_infop
++
)
{
for
(
xfs_infop
=
xfs_info
;
xfs_infop
->
flag
;
xfs_infop
++
)
{
if
(
mp
->
m_flags
&
xfs_infop
->
flag
)
if
(
mp
->
m_flags
&
xfs_infop
->
flag
)
...
@@ -1792,14 +1791,13 @@ xfs_showargs(
...
@@ -1792,14 +1791,13 @@ xfs_showargs(
if
(
mp
->
m_logbsize
>
0
)
if
(
mp
->
m_logbsize
>
0
)
seq_printf
(
m
,
","
MNTOPT_LOGBSIZE
"=%d"
,
mp
->
m_logbsize
);
seq_printf
(
m
,
","
MNTOPT_LOGBSIZE
"=%d"
,
mp
->
m_logbsize
);
if
(
mp
->
m_ddev_targp
->
pbr_dev
!=
mp
->
m_logdev_targp
->
pbr_dev
)
if
(
mp
->
m_ddev_targp
!=
mp
->
m_logdev_targp
)
seq_printf
(
m
,
","
MNTOPT_LOGDEV
"=%s"
,
seq_printf
(
m
,
","
MNTOPT_LOGDEV
"=%s"
,
bdevname
(
mp
->
m_logdev_targp
->
pbr_bdev
,
b
));
XFS_BUFTARG_NAME
(
mp
->
m_logdev_targp
));
if
(
mp
->
m_rtdev_targp
&&
if
(
mp
->
m_rtdev_targp
&&
mp
->
m_ddev_targp
!=
mp
->
m_rtdev_targp
)
mp
->
m_ddev_targp
->
pbr_dev
!=
mp
->
m_rtdev_targp
->
pbr_dev
)
seq_printf
(
m
,
","
MNTOPT_RTDEV
"=%s"
,
seq_printf
(
m
,
","
MNTOPT_RTDEV
"=%s"
,
bdevname
(
mp
->
m_rtdev_targp
->
pbr_bdev
,
b
));
XFS_BUFTARG_NAME
(
mp
->
m_rtdev_targp
));
if
(
mp
->
m_dalign
>
0
)
if
(
mp
->
m_dalign
>
0
)
seq_printf
(
m
,
","
MNTOPT_SUNIT
"=%d"
,
seq_printf
(
m
,
","
MNTOPT_SUNIT
"=%d"
,
...
...
fs/xfs/xfs_vnodeops.c
View file @
7d7bb19c
...
@@ -151,7 +151,6 @@ xfs_getattr(
...
@@ -151,7 +151,6 @@ xfs_getattr(
}
}
vap
->
va_nblocks
=
vap
->
va_nblocks
=
XFS_FSB_TO_BB
(
mp
,
ip
->
i_d
.
di_nblocks
+
ip
->
i_delayed_blks
);
XFS_FSB_TO_BB
(
mp
,
ip
->
i_d
.
di_nblocks
+
ip
->
i_delayed_blks
);
vap
->
va_fsid
=
mp
->
m_dev
;
vap
->
va_nodeid
=
ip
->
i_ino
;
vap
->
va_nodeid
=
ip
->
i_ino
;
#if XFS_BIG_INUMS
#if XFS_BIG_INUMS
vap
->
va_nodeid
+=
mp
->
m_inoadd
;
vap
->
va_nodeid
+=
mp
->
m_inoadd
;
...
@@ -1729,7 +1728,7 @@ xfs_inactive(
...
@@ -1729,7 +1728,7 @@ xfs_inactive(
if
(
ip
->
i_d
.
di_nlink
==
0
&&
if
(
ip
->
i_d
.
di_nlink
==
0
&&
DM_EVENT_ENABLED
(
vp
->
v_vfsp
,
ip
,
DM_EVENT_DESTROY
))
{
DM_EVENT_ENABLED
(
vp
->
v_vfsp
,
ip
,
DM_EVENT_DESTROY
))
{
(
void
)
XFS_SEND_DESTROY
(
mp
,
bd
p
,
DM_RIGHT_NULL
);
(
void
)
XFS_SEND_DESTROY
(
mp
,
v
p
,
DM_RIGHT_NULL
);
}
}
error
=
0
;
error
=
0
;
...
...
fs/xfs/xfsidbg.c
View file @
7d7bb19c
...
@@ -3739,9 +3739,9 @@ xfsidbg_xdabuf(xfs_dabuf_t *dabuf)
...
@@ -3739,9 +3739,9 @@ xfsidbg_xdabuf(xfs_dabuf_t *dabuf)
kdb_printf
(
" %d:0x%p"
,
i
,
dabuf
->
bps
[
i
]);
kdb_printf
(
" %d:0x%p"
,
i
,
dabuf
->
bps
[
i
]);
kdb_printf
(
"
\n
"
);
kdb_printf
(
"
\n
"
);
#ifdef XFS_DABUF_DEBUG
#ifdef XFS_DABUF_DEBUG
kdb_printf
(
" ra 0x%x prev 0x%x next 0x%x dev %
u:%u
blkno 0x%x
\n
"
,
kdb_printf
(
" ra 0x%x prev 0x%x next 0x%x dev %
s
blkno 0x%x
\n
"
,
dabuf
->
ra
,
dabuf
->
prev
,
dabuf
->
next
,
dabuf
->
ra
,
dabuf
->
prev
,
dabuf
->
next
,
MAJOR
(
dabuf
->
dev
),
MINOR
(
dabuf
->
dev
),
dabuf
->
blkno
);
XFS_BUFTARG_NAME
(
dabuf
->
dev
),
dabuf
->
blkno
);
#endif
#endif
}
}
...
@@ -4269,9 +4269,8 @@ xfsidbg_xlog(xlog_t *log)
...
@@ -4269,9 +4269,8 @@ xfsidbg_xlog(xlog_t *log)
xfsidbg_get_cstate
(
log
->
l_covered_state
));
xfsidbg_get_cstate
(
log
->
l_covered_state
));
kdb_printf
(
"flags: "
);
kdb_printf
(
"flags: "
);
printflags
(
log
->
l_flags
,
t_flags
,
"log"
);
printflags
(
log
->
l_flags
,
t_flags
,
"log"
);
kdb_printf
(
" dev: %u:%u logBBstart: %lld logsize: %d logBBsize: %d
\n
"
,
kdb_printf
(
" dev: %s logBBstart: %lld logsize: %d logBBsize: %d
\n
"
,
MAJOR
(
log
->
l_dev
),
MINOR
(
log
->
l_dev
),
XFS_BUFTARG_NAME
(
log
->
l_targ
),
(
long
long
)
log
->
l_logBBstart
,
(
long
long
)
log
->
l_logBBstart
,
log
->
l_logsize
,
log
->
l_logBBsize
);
log
->
l_logsize
,
log
->
l_logBBsize
);
kdb_printf
(
"curr_cycle: %d prev_cycle: %d curr_block: %d prev_block: %d
\n
"
,
kdb_printf
(
"curr_cycle: %d prev_cycle: %d curr_block: %d prev_block: %d
\n
"
,
log
->
l_curr_cycle
,
log
->
l_prev_cycle
,
log
->
l_curr_block
,
log
->
l_curr_cycle
,
log
->
l_prev_cycle
,
log
->
l_curr_block
,
...
@@ -4646,14 +4645,14 @@ xfsidbg_xmount(xfs_mount_t *mp)
...
@@ -4646,14 +4645,14 @@ xfsidbg_xmount(xfs_mount_t *mp)
XFS_MTOVFS
(
mp
),
mp
->
m_tid
,
&
mp
->
m_ail_lock
,
&
mp
->
m_ail
);
XFS_MTOVFS
(
mp
),
mp
->
m_tid
,
&
mp
->
m_ail_lock
,
&
mp
->
m_ail
);
kdb_printf
(
"ail_gen 0x%x &sb 0x%p
\n
"
,
kdb_printf
(
"ail_gen 0x%x &sb 0x%p
\n
"
,
mp
->
m_ail_gen
,
&
mp
->
m_sb
);
mp
->
m_ail_gen
,
&
mp
->
m_sb
);
kdb_printf
(
"sb_lock 0x%p sb_bp 0x%p dev %
u:%u logdev %u:%u rtdev %u:%u
\n
"
,
kdb_printf
(
"sb_lock 0x%p sb_bp 0x%p dev %
s logdev %s rtdev %s
\n
"
,
&
mp
->
m_sb_lock
,
mp
->
m_sb_bp
,
&
mp
->
m_sb_lock
,
mp
->
m_sb_bp
,
mp
->
m_ddev_targp
?
MAJOR
(
mp
->
m_ddev_targp
->
pbr_dev
)
:
0
,
mp
->
m_ddev_targp
?
mp
->
m_ddev_targp
?
MINOR
(
mp
->
m_ddev_targp
->
pbr_dev
)
:
0
,
XFS_BUFTARG_NAME
(
mp
->
m_ddev_targp
)
:
"none"
,
mp
->
m_logdev_targp
?
MAJOR
(
mp
->
m_logdev_targp
->
pbr_dev
)
:
0
,
mp
->
m_logdev_targp
?
mp
->
m_logdev_targp
?
MINOR
(
mp
->
m_logdev_targp
->
pbr_dev
)
:
0
,
XFS_BUFTARG_NAME
(
mp
->
m_logdev_targp
)
:
"none"
,
mp
->
m_rtdev_targp
?
MAJOR
(
mp
->
m_rtdev_targp
->
pbr_dev
)
:
0
,
mp
->
m_rtdev_targp
?
mp
->
m_rtdev_targp
?
MINOR
(
mp
->
m_rtdev_targp
->
pbr_dev
)
:
0
);
XFS_BUFTARG_NAME
(
mp
->
m_rtdev_targp
)
:
"none"
);
kdb_printf
(
"bsize %d agfrotor %d agirotor %d ihash 0x%p ihsize %d
\n
"
,
kdb_printf
(
"bsize %d agfrotor %d agirotor %d ihash 0x%p ihsize %d
\n
"
,
mp
->
m_bsize
,
mp
->
m_agfrotor
,
mp
->
m_agirotor
,
mp
->
m_bsize
,
mp
->
m_agfrotor
,
mp
->
m_agirotor
,
mp
->
m_ihash
,
mp
->
m_ihsize
);
mp
->
m_ihash
,
mp
->
m_ihsize
);
...
@@ -4824,9 +4823,8 @@ xfsidbg_xnode(xfs_inode_t *ip)
...
@@ -4824,9 +4823,8 @@ xfsidbg_xnode(xfs_inode_t *ip)
ip
->
i_mnext
,
ip
->
i_mnext
,
ip
->
i_mprev
,
ip
->
i_mprev
,
XFS_ITOV_NULL
(
ip
));
XFS_ITOV_NULL
(
ip
));
kdb_printf
(
"dev %u:%u ino %s
\n
"
,
kdb_printf
(
"dev %s ino %s
\n
"
,
MAJOR
(
ip
->
i_mount
->
m_dev
),
XFS_BUFTARG_NAME
(
ip
->
i_mount
->
m_ddev_targp
),
MINOR
(
ip
->
i_mount
->
m_dev
),
xfs_fmtino
(
ip
->
i_ino
,
ip
->
i_mount
));
xfs_fmtino
(
ip
->
i_ino
,
ip
->
i_mount
));
kdb_printf
(
"blkno 0x%llx len 0x%x boffset 0x%x
\n
"
,
kdb_printf
(
"blkno 0x%llx len 0x%x boffset 0x%x
\n
"
,
(
long
long
)
ip
->
i_blkno
,
(
long
long
)
ip
->
i_blkno
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment