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
Kirill Smelkov
linux
Commits
1dee7094
Commit
1dee7094
authored
May 22, 2004
by
Nathan Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[XFS] Remove unused transaction pointer from bulkstat.
SGI Modid: xfs-linux:xfs-kern:171081a
parent
0a9bde57
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
36 deletions
+28
-36
fs/xfs/linux/xfs_ioctl.c
fs/xfs/linux/xfs_ioctl.c
+2
-2
fs/xfs/quota/xfs_qm.c
fs/xfs/quota/xfs_qm.c
+2
-3
fs/xfs/quota/xfs_qm_syscalls.c
fs/xfs/quota/xfs_qm_syscalls.c
+2
-3
fs/xfs/xfs_itable.c
fs/xfs/xfs_itable.c
+22
-24
fs/xfs/xfs_itable.h
fs/xfs/xfs_itable.h
+0
-4
No files found.
fs/xfs/linux/xfs_ioctl.c
View file @
1dee7094
...
...
@@ -941,7 +941,7 @@ xfs_ioc_bulkstat(
return
-
XFS_ERROR
(
EINVAL
);
if
(
cmd
==
XFS_IOC_FSINUMBERS
)
error
=
xfs_inumbers
(
mp
,
NULL
,
&
inlast
,
&
count
,
error
=
xfs_inumbers
(
mp
,
&
inlast
,
&
count
,
bulkreq
.
ubuffer
);
else
if
(
cmd
==
XFS_IOC_FSBULKSTAT_SINGLE
)
error
=
xfs_bulkstat_single
(
mp
,
&
inlast
,
...
...
@@ -952,7 +952,7 @@ xfs_ioc_bulkstat(
error
=
xfs_bulkstat_single
(
mp
,
&
inlast
,
bulkreq
.
ubuffer
,
&
done
);
}
else
{
error
=
xfs_bulkstat
(
mp
,
NULL
,
&
inlast
,
&
count
,
error
=
xfs_bulkstat
(
mp
,
&
inlast
,
&
count
,
(
bulkstat_one_pf
)
xfs_bulkstat_one
,
NULL
,
sizeof
(
xfs_bstat_t
),
bulkreq
.
ubuffer
,
BULKSTAT_FG_QUICK
,
&
done
);
...
...
fs/xfs/quota/xfs_qm.c
View file @
1dee7094
...
...
@@ -1734,7 +1734,6 @@ xfs_qm_get_rtblks(
STATIC
int
xfs_qm_dqusage_adjust
(
xfs_mount_t
*
mp
,
/* mount point for filesystem */
xfs_trans_t
*
tp
,
/* transaction pointer - NULL */
xfs_ino_t
ino
,
/* inode number to get data for */
void
*
buffer
,
/* not used */
int
ubsize
,
/* not used */
...
...
@@ -1766,7 +1765,7 @@ xfs_qm_dqusage_adjust(
* the case in all other instances. It's OK that we do this because
* quotacheck is done only at mount time.
*/
if
((
error
=
xfs_iget
(
mp
,
tp
,
ino
,
XFS_ILOCK_EXCL
,
&
ip
,
bno
)))
{
if
((
error
=
xfs_iget
(
mp
,
NULL
,
ino
,
XFS_ILOCK_EXCL
,
&
ip
,
bno
)))
{
*
res
=
BULKSTAT_RV_NOTHING
;
return
(
error
);
}
...
...
@@ -1903,7 +1902,7 @@ xfs_qm_quotacheck(
* Iterate thru all the inodes in the file system,
* adjusting the corresponding dquot counters in core.
*/
if
((
error
=
xfs_bulkstat
(
mp
,
NULL
,
&
lastino
,
&
count
,
if
((
error
=
xfs_bulkstat
(
mp
,
&
lastino
,
&
count
,
xfs_qm_dqusage_adjust
,
NULL
,
structsz
,
NULL
,
BULKSTAT_FG_IGET
|
BULKSTAT_FG_VFSLOCKED
,
...
...
fs/xfs/quota/xfs_qm_syscalls.c
View file @
1dee7094
...
...
@@ -1298,7 +1298,6 @@ xfs_qm_internalqcheck_dqadjust(
STATIC
int
xfs_qm_internalqcheck_adjust
(
xfs_mount_t
*
mp
,
/* mount point for filesystem */
xfs_trans_t
*
tp
,
/* transaction pointer */
xfs_ino_t
ino
,
/* inode number to get data for */
void
*
buffer
,
/* not used */
int
ubsize
,
/* not used */
...
...
@@ -1327,7 +1326,7 @@ xfs_qm_internalqcheck_adjust(
ipreleased
=
B_FALSE
;
again:
lock_flags
=
XFS_ILOCK_SHARED
;
if
((
error
=
xfs_iget
(
mp
,
tp
,
ino
,
lock_flags
,
&
ip
,
bno
)))
{
if
((
error
=
xfs_iget
(
mp
,
NULL
,
ino
,
lock_flags
,
&
ip
,
bno
)))
{
*
res
=
BULKSTAT_RV_NOTHING
;
return
(
error
);
}
...
...
@@ -1405,7 +1404,7 @@ xfs_qm_internalqcheck(
* Iterate thru all the inodes in the file system,
* adjusting the corresponding dquot counters
*/
if
((
error
=
xfs_bulkstat
(
mp
,
NULL
,
&
lastino
,
&
count
,
if
((
error
=
xfs_bulkstat
(
mp
,
&
lastino
,
&
count
,
xfs_qm_internalqcheck_adjust
,
NULL
,
0
,
NULL
,
BULKSTAT_FG_IGET
,
&
done
)))
{
break
;
...
...
fs/xfs/xfs_itable.c
View file @
1dee7094
...
...
@@ -55,14 +55,18 @@
#include "xfs_itable.h"
#include "xfs_error.h"
#ifndef HAVE_USERACC
#define useracc(ubuffer, size, flags, foo) (0)
#define unuseracc(ubuffer, size, flags)
#endif
/*
* Return stat information for one inode.
* Return 0 if ok, else errno.
*/
int
/* error status */
int
/* error status */
xfs_bulkstat_one
(
xfs_mount_t
*
mp
,
/* mount point for filesystem */
xfs_trans_t
*
tp
,
/* transaction pointer */
xfs_ino_t
ino
,
/* inode number to get data for */
void
*
buffer
,
/* buffer to place output in */
int
ubsize
,
/* size of buffer */
...
...
@@ -98,7 +102,7 @@ xfs_bulkstat_one(
/* We're not being passed a pointer to a dinode. This happens
* if BULKSTAT_FG_IGET is selected. Do the iget.
*/
error
=
xfs_iget
(
mp
,
tp
,
ino
,
XFS_ILOCK_SHARED
,
&
ip
,
bno
);
error
=
xfs_iget
(
mp
,
NULL
,
ino
,
XFS_ILOCK_SHARED
,
&
ip
,
bno
);
if
(
error
)
{
*
stat
=
BULKSTAT_RV_NOTHING
;
return
error
;
...
...
@@ -236,7 +240,6 @@ xfs_bulkstat_one(
int
/* error status */
xfs_bulkstat
(
xfs_mount_t
*
mp
,
/* mount point for filesystem */
xfs_trans_t
*
tp
,
/* transaction pointer */
xfs_ino_t
*
lastinop
,
/* last inode returned */
int
*
ubcountp
,
/* size of buffer/count returned */
bulkstat_one_pf
formatter
,
/* func that'd fill a single buf */
...
...
@@ -311,13 +314,11 @@ xfs_bulkstat(
* Lock down the user's buffer. If a buffer was not sent, as in the case
* disk quota code calls here, we skip this.
*/
#if defined(HAVE_USERACC)
if
(
ubuffer
&&
(
error
=
useracc
(
ubuffer
,
ubcount
*
statstruct_size
,
(
B_READ
|
B_PHYS
),
NULL
)))
{
return
error
;
}
#endif
/*
* Allocate a page-sized buffer for inode btree records.
* We could try allocating something smaller, but for normal
...
...
@@ -333,7 +334,7 @@ xfs_bulkstat(
while
(
ubleft
>=
statstruct_size
&&
agno
<
mp
->
m_sb
.
sb_agcount
)
{
bp
=
NULL
;
down_read
(
&
mp
->
m_peraglock
);
error
=
xfs_ialloc_read_agi
(
mp
,
tp
,
agno
,
&
agbp
);
error
=
xfs_ialloc_read_agi
(
mp
,
NULL
,
agno
,
&
agbp
);
up_read
(
&
mp
->
m_peraglock
);
if
(
error
)
{
/*
...
...
@@ -347,7 +348,7 @@ xfs_bulkstat(
/*
* Allocate and initialize a btree cursor for ialloc btree.
*/
cur
=
xfs_btree_init_cursor
(
mp
,
tp
,
agbp
,
agno
,
XFS_BTNUM_INO
,
cur
=
xfs_btree_init_cursor
(
mp
,
NULL
,
agbp
,
agno
,
XFS_BTNUM_INO
,
(
xfs_inode_t
*
)
0
,
0
);
irbp
=
irbuf
;
irbufend
=
irbuf
+
nirbuf
;
...
...
@@ -461,7 +462,7 @@ xfs_bulkstat(
* when calling iget.
*/
xfs_btree_del_cursor
(
cur
,
XFS_BTREE_NOERROR
);
xfs_
trans_brelse
(
tp
,
agbp
);
xfs_
buf_relse
(
agbp
);
/*
* Now format all the good inodes into the user's buffer.
*/
...
...
@@ -534,8 +535,8 @@ xfs_bulkstat(
ip
->
i_ino
=
ino
;
ip
->
i_mount
=
mp
;
if
(
bp
)
xfs_
trans_brelse
(
tp
,
bp
);
error
=
xfs_itobp
(
mp
,
tp
,
ip
,
xfs_
buf_relse
(
bp
);
error
=
xfs_itobp
(
mp
,
NULL
,
ip
,
&
dip
,
&
bp
,
bno
);
if
(
!
error
)
clustidx
=
ip
->
i_boffset
/
mp
->
m_sb
.
sb_inodesize
;
...
...
@@ -580,7 +581,7 @@ xfs_bulkstat(
* in xfs_qm_quotacheck.
*/
ubused
=
statstruct_size
;
error
=
formatter
(
mp
,
tp
,
ino
,
ubufp
,
error
=
formatter
(
mp
,
ino
,
ubufp
,
ubleft
,
private_data
,
bno
,
&
ubused
,
dip
,
&
fmterror
);
if
(
fmterror
==
BULKSTAT_RV_NOTHING
)
{
...
...
@@ -603,7 +604,7 @@ xfs_bulkstat(
}
if
(
bp
)
xfs_
trans_brelse
(
tp
,
bp
);
xfs_
buf_relse
(
bp
);
/*
* Set up for the next loop iteration.
...
...
@@ -621,10 +622,8 @@ xfs_bulkstat(
* Done, we're either out of filesystem or space to put the data.
*/
kmem_free
(
irbuf
,
NBPC
);
#if defined(HAVE_USERACC)
if
(
ubuffer
)
unuseracc
(
ubuffer
,
ubcount
*
statstruct_size
,
(
B_READ
|
B_PHYS
));
#endif
*
ubcountp
=
ubelem
;
if
(
agno
>=
mp
->
m_sb
.
sb_agcount
)
{
/*
...
...
@@ -667,7 +666,7 @@ xfs_bulkstat_single(
*/
ino
=
(
xfs_ino_t
)
*
lastinop
;
error
=
xfs_bulkstat_one
(
mp
,
NULL
,
ino
,
&
bstat
,
sizeof
(
bstat
),
error
=
xfs_bulkstat_one
(
mp
,
ino
,
&
bstat
,
sizeof
(
bstat
),
NULL
,
0
,
NULL
,
NULL
,
&
res
);
if
(
error
)
{
/*
...
...
@@ -676,7 +675,7 @@ xfs_bulkstat_single(
*/
(
*
lastinop
)
--
;
count
=
1
;
if
(
xfs_bulkstat
(
mp
,
NULL
,
lastinop
,
&
count
,
xfs_bulkstat_one
,
if
(
xfs_bulkstat
(
mp
,
lastinop
,
&
count
,
xfs_bulkstat_one
,
NULL
,
sizeof
(
bstat
),
buffer
,
BULKSTAT_FG_IGET
,
done
))
return
error
;
...
...
@@ -698,7 +697,6 @@ xfs_bulkstat_single(
int
/* error status */
xfs_inumbers
(
xfs_mount_t
*
mp
,
/* mount point for filesystem */
xfs_trans_t
*
tp
,
/* transaction pointer */
xfs_ino_t
*
lastino
,
/* last inode returned */
int
*
count
,
/* size of buffer/count returned */
xfs_caddr_t
ubuffer
)
/* buffer with inode descriptions */
...
...
@@ -732,7 +730,7 @@ xfs_inumbers(
while
(
left
>
0
&&
agno
<
mp
->
m_sb
.
sb_agcount
)
{
if
(
agbp
==
NULL
)
{
down_read
(
&
mp
->
m_peraglock
);
error
=
xfs_ialloc_read_agi
(
mp
,
tp
,
agno
,
&
agbp
);
error
=
xfs_ialloc_read_agi
(
mp
,
NULL
,
agno
,
&
agbp
);
up_read
(
&
mp
->
m_peraglock
);
if
(
error
)
{
/*
...
...
@@ -745,13 +743,13 @@ xfs_inumbers(
agino
=
0
;
continue
;
}
cur
=
xfs_btree_init_cursor
(
mp
,
tp
,
agbp
,
agno
,
cur
=
xfs_btree_init_cursor
(
mp
,
NULL
,
agbp
,
agno
,
XFS_BTNUM_INO
,
(
xfs_inode_t
*
)
0
,
0
);
error
=
xfs_inobt_lookup_ge
(
cur
,
agino
,
0
,
0
,
&
tmp
);
if
(
error
)
{
xfs_btree_del_cursor
(
cur
,
XFS_BTREE_ERROR
);
cur
=
NULL
;
xfs_
trans_brelse
(
tp
,
agbp
);
xfs_
buf_relse
(
agbp
);
agbp
=
NULL
;
/*
* Move up the the last inode in the current
...
...
@@ -765,7 +763,7 @@ xfs_inumbers(
if
((
error
=
xfs_inobt_get_rec
(
cur
,
&
gino
,
&
gcnt
,
&
gfree
,
&
i
,
ARCH_NOCONVERT
))
||
i
==
0
)
{
xfs_
trans_brelse
(
tp
,
agbp
);
xfs_
buf_relse
(
agbp
);
agbp
=
NULL
;
xfs_btree_del_cursor
(
cur
,
XFS_BTREE_NOERROR
);
cur
=
NULL
;
...
...
@@ -794,7 +792,7 @@ xfs_inumbers(
if
(
error
)
{
xfs_btree_del_cursor
(
cur
,
XFS_BTREE_ERROR
);
cur
=
NULL
;
xfs_
trans_brelse
(
tp
,
agbp
);
xfs_
buf_relse
(
agbp
);
agbp
=
NULL
;
/*
* The agino value has already been bumped.
...
...
@@ -820,6 +818,6 @@ xfs_inumbers(
xfs_btree_del_cursor
(
cur
,
(
error
?
XFS_BTREE_ERROR
:
XFS_BTREE_NOERROR
));
if
(
agbp
)
xfs_
trans_brelse
(
tp
,
agbp
);
xfs_
buf_relse
(
agbp
);
return
error
;
}
fs/xfs/xfs_itable.h
View file @
1dee7094
...
...
@@ -39,7 +39,6 @@
* see xfs_bulkstat_one() and xfs_dm_bulkstat_one() in dmapi_xfs.c
*/
typedef
int
(
*
bulkstat_one_pf
)(
struct
xfs_mount
*
mp
,
struct
xfs_trans
*
tp
,
xfs_ino_t
ino
,
void
*
buffer
,
int
ubsize
,
...
...
@@ -69,7 +68,6 @@ typedef int (*bulkstat_one_pf)(struct xfs_mount *mp,
int
/* error status */
xfs_bulkstat
(
xfs_mount_t
*
mp
,
/* mount point for filesystem */
xfs_trans_t
*
tp
,
/* transaction pointer */
xfs_ino_t
*
lastino
,
/* last inode returned */
int
*
count
,
/* size of buffer/count returned */
bulkstat_one_pf
formatter
,
/* func that'd fill a single buf */
...
...
@@ -89,7 +87,6 @@ xfs_bulkstat_single(
int
xfs_bulkstat_one
(
xfs_mount_t
*
mp
,
xfs_trans_t
*
tp
,
xfs_ino_t
ino
,
void
*
buffer
,
int
ubsize
,
...
...
@@ -102,7 +99,6 @@ xfs_bulkstat_one(
int
/* error status */
xfs_inumbers
(
xfs_mount_t
*
mp
,
/* mount point for filesystem */
xfs_trans_t
*
tp
,
/* transaction pointer */
xfs_ino_t
*
last
,
/* last inode returned */
int
*
count
,
/* size of buffer/count returned */
xfs_caddr_t
buffer
);
/* buffer with inode descriptions */
...
...
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