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
cb7a9341
Commit
cb7a9341
authored
Sep 03, 2010
by
Alex Elder
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.6.36-xfs-misc' of
git://git.kernel.org/pub/scm/linux/kernel/git/dgc/xfsdev
parents
9af25465
72656c46
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
11 deletions
+11
-11
fs/xfs/linux-2.6/xfs_buf.c
fs/xfs/linux-2.6/xfs_buf.c
+1
-7
fs/xfs/linux-2.6/xfs_buf.h
fs/xfs/linux-2.6/xfs_buf.h
+0
-1
fs/xfs/xfs_vnodeops.c
fs/xfs/xfs_vnodeops.c
+10
-3
No files found.
fs/xfs/linux-2.6/xfs_buf.c
View file @
cb7a9341
...
@@ -440,12 +440,7 @@ _xfs_buf_find(
...
@@ -440,12 +440,7 @@ _xfs_buf_find(
ASSERT
(
btp
==
bp
->
b_target
);
ASSERT
(
btp
==
bp
->
b_target
);
if
(
bp
->
b_file_offset
==
range_base
&&
if
(
bp
->
b_file_offset
==
range_base
&&
bp
->
b_buffer_length
==
range_length
)
{
bp
->
b_buffer_length
==
range_length
)
{
/*
* If we look at something, bring it to the
* front of the list for next time.
*/
atomic_inc
(
&
bp
->
b_hold
);
atomic_inc
(
&
bp
->
b_hold
);
list_move
(
&
bp
->
b_hash_list
,
&
hash
->
bh_list
);
goto
found
;
goto
found
;
}
}
}
}
...
@@ -1443,8 +1438,7 @@ xfs_alloc_bufhash(
...
@@ -1443,8 +1438,7 @@ xfs_alloc_bufhash(
{
{
unsigned
int
i
;
unsigned
int
i
;
btp
->
bt_hashshift
=
external
?
3
:
8
;
/* 8 or 256 buckets */
btp
->
bt_hashshift
=
external
?
3
:
12
;
/* 8 or 4096 buckets */
btp
->
bt_hashmask
=
(
1
<<
btp
->
bt_hashshift
)
-
1
;
btp
->
bt_hash
=
kmem_zalloc_large
((
1
<<
btp
->
bt_hashshift
)
*
btp
->
bt_hash
=
kmem_zalloc_large
((
1
<<
btp
->
bt_hashshift
)
*
sizeof
(
xfs_bufhash_t
));
sizeof
(
xfs_bufhash_t
));
for
(
i
=
0
;
i
<
(
1
<<
btp
->
bt_hashshift
);
i
++
)
{
for
(
i
=
0
;
i
<
(
1
<<
btp
->
bt_hashshift
);
i
++
)
{
...
...
fs/xfs/linux-2.6/xfs_buf.h
View file @
cb7a9341
...
@@ -137,7 +137,6 @@ typedef struct xfs_buftarg {
...
@@ -137,7 +137,6 @@ typedef struct xfs_buftarg {
size_t
bt_smask
;
size_t
bt_smask
;
/* per device buffer hash table */
/* per device buffer hash table */
uint
bt_hashmask
;
uint
bt_hashshift
;
uint
bt_hashshift
;
xfs_bufhash_t
*
bt_hash
;
xfs_bufhash_t
*
bt_hash
;
...
...
fs/xfs/xfs_vnodeops.c
View file @
cb7a9341
...
@@ -2299,15 +2299,22 @@ xfs_alloc_file_space(
...
@@ -2299,15 +2299,22 @@ xfs_alloc_file_space(
e
=
allocatesize_fsb
;
e
=
allocatesize_fsb
;
}
}
/*
* The transaction reservation is limited to a 32-bit block
* count, hence we need to limit the number of blocks we are
* trying to reserve to avoid an overflow. We can't allocate
* more than @nimaps extents, and an extent is limited on disk
* to MAXEXTLEN (21 bits), so use that to enforce the limit.
*/
resblks
=
min_t
(
xfs_fileoff_t
,
(
e
-
s
),
(
MAXEXTLEN
*
nimaps
));
if
(
unlikely
(
rt
))
{
if
(
unlikely
(
rt
))
{
resrtextents
=
qblocks
=
(
uint
)(
e
-
s
)
;
resrtextents
=
qblocks
=
resblks
;
resrtextents
/=
mp
->
m_sb
.
sb_rextsize
;
resrtextents
/=
mp
->
m_sb
.
sb_rextsize
;
resblks
=
XFS_DIOSTRAT_SPACE_RES
(
mp
,
0
);
resblks
=
XFS_DIOSTRAT_SPACE_RES
(
mp
,
0
);
quota_flag
=
XFS_QMOPT_RES_RTBLKS
;
quota_flag
=
XFS_QMOPT_RES_RTBLKS
;
}
else
{
}
else
{
resrtextents
=
0
;
resrtextents
=
0
;
resblks
=
qblocks
=
\
resblks
=
qblocks
=
XFS_DIOSTRAT_SPACE_RES
(
mp
,
resblks
);
XFS_DIOSTRAT_SPACE_RES
(
mp
,
(
uint
)(
e
-
s
));
quota_flag
=
XFS_QMOPT_RES_REGBLKS
;
quota_flag
=
XFS_QMOPT_RES_REGBLKS
;
}
}
...
...
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