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
4740cd8b
Commit
4740cd8b
authored
Mar 16, 2009
by
Felix Blyakher
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
git://git.kernel.org/pub/scm/fs/xfs/xfs
parents
cb1b7780
6cc87645
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
217 additions
and
202 deletions
+217
-202
fs/xfs/linux-2.6/xfs_vnode.h
fs/xfs/linux-2.6/xfs_vnode.h
+0
-27
fs/xfs/xfs_alloc.c
fs/xfs/xfs_alloc.c
+21
-5
fs/xfs/xfs_alloc.h
fs/xfs/xfs_alloc.h
+6
-0
fs/xfs/xfs_bmap.c
fs/xfs/xfs_bmap.c
+2
-10
fs/xfs/xfs_filestream.c
fs/xfs/xfs_filestream.c
+2
-7
fs/xfs/xfs_itable.c
fs/xfs/xfs_itable.c
+6
-1
fs/xfs/xfs_log.c
fs/xfs/xfs_log.c
+1
-14
fs/xfs/xfs_log.h
fs/xfs/xfs_log.h
+1
-2
fs/xfs/xfs_log_priv.h
fs/xfs/xfs_log_priv.h
+0
-1
fs/xfs/xfs_log_recover.c
fs/xfs/xfs_log_recover.c
+173
-131
fs/xfs/xfs_mount.c
fs/xfs/xfs_mount.c
+3
-2
fs/xfs/xfs_vnodeops.c
fs/xfs/xfs_vnodeops.c
+2
-2
No files found.
fs/xfs/linux-2.6/xfs_vnode.h
View file @
4740cd8b
...
...
@@ -49,33 +49,6 @@ struct attrlist_cursor_kern;
Prevent VM access to the pages until
the operation completes. */
/*
* Dealing with bad inodes
*/
static
inline
int
VN_BAD
(
struct
inode
*
vp
)
{
return
is_bad_inode
(
vp
);
}
/*
* Extracting atime values in various formats
*/
static
inline
void
vn_atime_to_bstime
(
struct
inode
*
vp
,
xfs_bstime_t
*
bs_atime
)
{
bs_atime
->
tv_sec
=
vp
->
i_atime
.
tv_sec
;
bs_atime
->
tv_nsec
=
vp
->
i_atime
.
tv_nsec
;
}
static
inline
void
vn_atime_to_timespec
(
struct
inode
*
vp
,
struct
timespec
*
ts
)
{
*
ts
=
vp
->
i_atime
;
}
static
inline
void
vn_atime_to_time_t
(
struct
inode
*
vp
,
time_t
*
tt
)
{
*
tt
=
vp
->
i_atime
.
tv_sec
;
}
/*
* Some useful predicates.
*/
...
...
fs/xfs/xfs_alloc.c
View file @
4740cd8b
...
...
@@ -1871,6 +1871,25 @@ xfs_alloc_compute_maxlevels(
mp
->
m_ag_maxlevels
=
level
;
}
/*
* Find the length of the longest extent in an AG.
*/
xfs_extlen_t
xfs_alloc_longest_free_extent
(
struct
xfs_mount
*
mp
,
struct
xfs_perag
*
pag
)
{
xfs_extlen_t
need
,
delta
=
0
;
need
=
XFS_MIN_FREELIST_PAG
(
pag
,
mp
);
if
(
need
>
pag
->
pagf_flcount
)
delta
=
need
-
pag
->
pagf_flcount
;
if
(
pag
->
pagf_longest
>
delta
)
return
pag
->
pagf_longest
-
delta
;
return
pag
->
pagf_flcount
>
0
||
pag
->
pagf_longest
>
0
;
}
/*
* Decide whether to use this allocation group for this allocation.
* If so, fix up the btree freelist's size.
...
...
@@ -1923,15 +1942,12 @@ xfs_alloc_fix_freelist(
}
if
(
!
(
flags
&
XFS_ALLOC_FLAG_FREEING
))
{
need
=
XFS_MIN_FREELIST_PAG
(
pag
,
mp
);
delta
=
need
>
pag
->
pagf_flcount
?
need
-
pag
->
pagf_flcount
:
0
;
/*
* If it looks like there isn't a long enough extent, or enough
* total blocks, reject it.
*/
longest
=
(
pag
->
pagf_longest
>
delta
)
?
(
pag
->
pagf_longest
-
delta
)
:
(
pag
->
pagf_flcount
>
0
||
pag
->
pagf_longest
>
0
);
need
=
XFS_MIN_FREELIST_PAG
(
pag
,
mp
);
longest
=
xfs_alloc_longest_free_extent
(
mp
,
pag
);
if
((
args
->
minlen
+
args
->
alignment
+
args
->
minalignslop
-
1
)
>
longest
||
((
int
)(
pag
->
pagf_freeblks
+
pag
->
pagf_flcount
-
...
...
fs/xfs/xfs_alloc.h
View file @
4740cd8b
...
...
@@ -100,6 +100,12 @@ typedef struct xfs_alloc_arg {
#define XFS_ALLOC_USERDATA 1
/* allocation is for user data*/
#define XFS_ALLOC_INITIAL_USER_DATA 2
/* special case start of file */
/*
* Find the length of the longest extent in an AG.
*/
xfs_extlen_t
xfs_alloc_longest_free_extent
(
struct
xfs_mount
*
mp
,
struct
xfs_perag
*
pag
);
#ifdef __KERNEL__
...
...
fs/xfs/xfs_bmap.c
View file @
4740cd8b
...
...
@@ -2712,9 +2712,6 @@ xfs_bmap_btalloc(
xfs_agnumber_t
startag
;
xfs_alloc_arg_t
args
;
xfs_extlen_t
blen
;
xfs_extlen_t
delta
;
xfs_extlen_t
longest
;
xfs_extlen_t
need
;
xfs_extlen_t
nextminlen
=
0
;
xfs_perag_t
*
pag
;
int
nullfb
;
/* true if ap->firstblock isn't set */
...
...
@@ -2796,13 +2793,8 @@ xfs_bmap_btalloc(
* See xfs_alloc_fix_freelist...
*/
if
(
pag
->
pagf_init
)
{
need
=
XFS_MIN_FREELIST_PAG
(
pag
,
mp
);
delta
=
need
>
pag
->
pagf_flcount
?
need
-
pag
->
pagf_flcount
:
0
;
longest
=
(
pag
->
pagf_longest
>
delta
)
?
(
pag
->
pagf_longest
-
delta
)
:
(
pag
->
pagf_flcount
>
0
||
pag
->
pagf_longest
>
0
);
xfs_extlen_t
longest
;
longest
=
xfs_alloc_longest_free_extent
(
mp
,
pag
);
if
(
blen
<
longest
)
blen
=
longest
;
}
else
...
...
fs/xfs/xfs_filestream.c
View file @
4740cd8b
...
...
@@ -140,7 +140,7 @@ _xfs_filestream_pick_ag(
xfs_extlen_t
minlen
)
{
int
err
,
trylock
,
nscan
;
xfs_extlen_t
delta
,
longest
,
need
,
free
,
minfree
,
maxfree
=
0
;
xfs_extlen_t
longest
,
free
,
minfree
,
maxfree
=
0
;
xfs_agnumber_t
ag
,
max_ag
=
NULLAGNUMBER
;
struct
xfs_perag
*
pag
;
...
...
@@ -186,12 +186,7 @@ _xfs_filestream_pick_ag(
goto
next_ag
;
}
need
=
XFS_MIN_FREELIST_PAG
(
pag
,
mp
);
delta
=
need
>
pag
->
pagf_flcount
?
need
-
pag
->
pagf_flcount
:
0
;
longest
=
(
pag
->
pagf_longest
>
delta
)
?
(
pag
->
pagf_longest
-
delta
)
:
(
pag
->
pagf_flcount
>
0
||
pag
->
pagf_longest
>
0
);
longest
=
xfs_alloc_longest_free_extent
(
mp
,
pag
);
if
(((
minlen
&&
longest
>=
minlen
)
||
(
!
minlen
&&
pag
->
pagf_freeblks
>=
minfree
))
&&
(
!
pag
->
pagf_metadata
||
!
(
flags
&
XFS_PICK_USERDATA
)
||
...
...
fs/xfs/xfs_itable.c
View file @
4740cd8b
...
...
@@ -83,7 +83,12 @@ xfs_bulkstat_one_iget(
buf
->
bs_uid
=
dic
->
di_uid
;
buf
->
bs_gid
=
dic
->
di_gid
;
buf
->
bs_size
=
dic
->
di_size
;
vn_atime_to_bstime
(
VFS_I
(
ip
),
&
buf
->
bs_atime
);
/*
* We are reading the atime from the Linux inode because the
* dinode might not be uptodate.
*/
buf
->
bs_atime
.
tv_sec
=
VFS_I
(
ip
)
->
i_atime
.
tv_sec
;
buf
->
bs_atime
.
tv_nsec
=
VFS_I
(
ip
)
->
i_atime
.
tv_nsec
;
buf
->
bs_mtime
.
tv_sec
=
dic
->
di_mtime
.
t_sec
;
buf
->
bs_mtime
.
tv_nsec
=
dic
->
di_mtime
.
t_nsec
;
buf
->
bs_ctime
.
tv_sec
=
dic
->
di_ctime
.
t_sec
;
...
...
fs/xfs/xfs_log.c
View file @
4740cd8b
...
...
@@ -634,19 +634,6 @@ xfs_log_mount_finish(xfs_mount_t *mp)
return
error
;
}
/*
* Unmount processing for the log.
*/
int
xfs_log_unmount
(
xfs_mount_t
*
mp
)
{
int
error
;
error
=
xfs_log_unmount_write
(
mp
);
xfs_log_unmount_dealloc
(
mp
);
return
error
;
}
/*
* Final log writes as part of unmount.
*
...
...
@@ -797,7 +784,7 @@ xfs_log_unmount_write(xfs_mount_t *mp)
* and deallocate the log as the aild references the log.
*/
void
xfs_log_unmount
_dealloc
(
xfs_mount_t
*
mp
)
xfs_log_unmount
(
xfs_mount_t
*
mp
)
{
xfs_trans_ail_destroy
(
mp
);
xlog_dealloc_log
(
mp
->
m_log
);
...
...
fs/xfs/xfs_log.h
View file @
4740cd8b
...
...
@@ -170,9 +170,8 @@ int xfs_log_write(struct xfs_mount *mp,
int
nentries
,
xfs_log_ticket_t
ticket
,
xfs_lsn_t
*
start_lsn
);
int
xfs_log_unmount
(
struct
xfs_mount
*
mp
);
int
xfs_log_unmount_write
(
struct
xfs_mount
*
mp
);
void
xfs_log_unmount
_dealloc
(
struct
xfs_mount
*
mp
);
void
xfs_log_unmount
(
struct
xfs_mount
*
mp
);
int
xfs_log_force_umount
(
struct
xfs_mount
*
mp
,
int
logerror
);
int
xfs_log_need_covered
(
struct
xfs_mount
*
mp
);
...
...
fs/xfs/xfs_log_priv.h
View file @
4740cd8b
...
...
@@ -455,7 +455,6 @@ extern void xlog_recover_process_iunlinks(xlog_t *log);
extern
struct
xfs_buf
*
xlog_get_bp
(
xlog_t
*
,
int
);
extern
void
xlog_put_bp
(
struct
xfs_buf
*
);
extern
int
xlog_bread
(
xlog_t
*
,
xfs_daddr_t
,
int
,
struct
xfs_buf
*
);
extern
kmem_zone_t
*
xfs_log_ticket_zone
;
...
...
fs/xfs/xfs_log_recover.c
View file @
4740cd8b
This diff is collapsed.
Click to expand it.
fs/xfs/xfs_mount.c
View file @
4740cd8b
...
...
@@ -1194,7 +1194,7 @@ xfs_mountfs(
out_rele_rip:
IRELE
(
rip
);
out_log_dealloc:
xfs_log_unmount
_dealloc
(
mp
);
xfs_log_unmount
(
mp
);
out_free_perag:
xfs_free_perag
(
mp
);
out_remove_uuid:
...
...
@@ -1280,7 +1280,8 @@ xfs_unmountfs(
"Freespace may not be correct on next mount."
);
xfs_unmountfs_writesb
(
mp
);
xfs_unmountfs_wait
(
mp
);
/* wait for async bufs */
xfs_log_unmount
(
mp
);
/* Done! No more fs ops. */
xfs_log_unmount_write
(
mp
);
xfs_log_unmount
(
mp
);
if
((
mp
->
m_flags
&
XFS_MOUNT_NOUUID
)
==
0
)
uuid_table_remove
(
&
mp
->
m_sb
.
sb_uuid
);
...
...
fs/xfs/xfs_vnodeops.c
View file @
4740cd8b
...
...
@@ -1136,7 +1136,7 @@ xfs_inactive(
* If the inode is already free, then there can be nothing
* to clean up here.
*/
if
(
ip
->
i_d
.
di_mode
==
0
||
VN_BAD
(
VFS_I
(
ip
)))
{
if
(
ip
->
i_d
.
di_mode
==
0
||
is_bad_inode
(
VFS_I
(
ip
)))
{
ASSERT
(
ip
->
i_df
.
if_real_bytes
==
0
);
ASSERT
(
ip
->
i_df
.
if_broot_bytes
==
0
);
return
VN_INACTIVE_CACHE
;
...
...
@@ -2448,7 +2448,7 @@ xfs_reclaim(
ASSERT
(
!
VN_MAPPED
(
VFS_I
(
ip
)));
/* bad inode, get out here ASAP */
if
(
VN_BAD
(
VFS_I
(
ip
)))
{
if
(
is_bad_inode
(
VFS_I
(
ip
)))
{
xfs_ireclaim
(
ip
);
return
0
;
}
...
...
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