Commit 9befb55ef51ad69dd67e279b0533d4cbc5e4c6c0
Exists in
master
and in
7 other branches
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6: jfs: add jfs specific ->setattr call jfs: fix diAllocExt error in resizing filesystem jfs_dmap.[ch]: trivial typo fix: s/heigth/height/g
Showing 7 changed files Side-by-side Diff
fs/jfs/inode.c
... | ... | @@ -61,7 +61,7 @@ |
61 | 61 | inode->i_op = &page_symlink_inode_operations; |
62 | 62 | inode->i_mapping->a_ops = &jfs_aops; |
63 | 63 | } else { |
64 | - inode->i_op = &jfs_symlink_inode_operations; | |
64 | + inode->i_op = &jfs_fast_symlink_inode_operations; | |
65 | 65 | /* |
66 | 66 | * The inline data should be null-terminated, but |
67 | 67 | * don't let on-disk corruption crash the kernel |
fs/jfs/jfs_dmap.c
... | ... | @@ -196,7 +196,7 @@ |
196 | 196 | bmp->db_maxag = le32_to_cpu(dbmp_le->dn_maxag); |
197 | 197 | bmp->db_agpref = le32_to_cpu(dbmp_le->dn_agpref); |
198 | 198 | bmp->db_aglevel = le32_to_cpu(dbmp_le->dn_aglevel); |
199 | - bmp->db_agheigth = le32_to_cpu(dbmp_le->dn_agheigth); | |
199 | + bmp->db_agheight = le32_to_cpu(dbmp_le->dn_agheight); | |
200 | 200 | bmp->db_agwidth = le32_to_cpu(dbmp_le->dn_agwidth); |
201 | 201 | bmp->db_agstart = le32_to_cpu(dbmp_le->dn_agstart); |
202 | 202 | bmp->db_agl2size = le32_to_cpu(dbmp_le->dn_agl2size); |
... | ... | @@ -288,7 +288,7 @@ |
288 | 288 | dbmp_le->dn_maxag = cpu_to_le32(bmp->db_maxag); |
289 | 289 | dbmp_le->dn_agpref = cpu_to_le32(bmp->db_agpref); |
290 | 290 | dbmp_le->dn_aglevel = cpu_to_le32(bmp->db_aglevel); |
291 | - dbmp_le->dn_agheigth = cpu_to_le32(bmp->db_agheigth); | |
291 | + dbmp_le->dn_agheight = cpu_to_le32(bmp->db_agheight); | |
292 | 292 | dbmp_le->dn_agwidth = cpu_to_le32(bmp->db_agwidth); |
293 | 293 | dbmp_le->dn_agstart = cpu_to_le32(bmp->db_agstart); |
294 | 294 | dbmp_le->dn_agl2size = cpu_to_le32(bmp->db_agl2size); |
... | ... | @@ -1441,7 +1441,7 @@ |
1441 | 1441 | * tree index of this allocation group within the control page. |
1442 | 1442 | */ |
1443 | 1443 | agperlev = |
1444 | - (1 << (L2LPERCTL - (bmp->db_agheigth << 1))) / bmp->db_agwidth; | |
1444 | + (1 << (L2LPERCTL - (bmp->db_agheight << 1))) / bmp->db_agwidth; | |
1445 | 1445 | ti = bmp->db_agstart + bmp->db_agwidth * (agno & (agperlev - 1)); |
1446 | 1446 | |
1447 | 1447 | /* dmap control page trees fan-out by 4 and a single allocation |
... | ... | @@ -1460,7 +1460,7 @@ |
1460 | 1460 | * the subtree to find the leftmost leaf that describes this |
1461 | 1461 | * free space. |
1462 | 1462 | */ |
1463 | - for (k = bmp->db_agheigth; k > 0; k--) { | |
1463 | + for (k = bmp->db_agheight; k > 0; k--) { | |
1464 | 1464 | for (n = 0, m = (ti << 2) + 1; n < 4; n++) { |
1465 | 1465 | if (l2nb <= dcp->stree[m + n]) { |
1466 | 1466 | ti = m + n; |
... | ... | @@ -3607,7 +3607,7 @@ |
3607 | 3607 | } |
3608 | 3608 | |
3609 | 3609 | /* |
3610 | - * compute db_aglevel, db_agheigth, db_width, db_agstart: | |
3610 | + * compute db_aglevel, db_agheight, db_width, db_agstart: | |
3611 | 3611 | * an ag is covered in aglevel dmapctl summary tree, |
3612 | 3612 | * at agheight level height (from leaf) with agwidth number of nodes |
3613 | 3613 | * each, which starts at agstart index node of the smmary tree node |
... | ... | @@ -3616,9 +3616,9 @@ |
3616 | 3616 | bmp->db_aglevel = BMAPSZTOLEV(bmp->db_agsize); |
3617 | 3617 | l2nl = |
3618 | 3618 | bmp->db_agl2size - (L2BPERDMAP + bmp->db_aglevel * L2LPERCTL); |
3619 | - bmp->db_agheigth = l2nl >> 1; | |
3620 | - bmp->db_agwidth = 1 << (l2nl - (bmp->db_agheigth << 1)); | |
3621 | - for (i = 5 - bmp->db_agheigth, bmp->db_agstart = 0, n = 1; i > 0; | |
3619 | + bmp->db_agheight = l2nl >> 1; | |
3620 | + bmp->db_agwidth = 1 << (l2nl - (bmp->db_agheight << 1)); | |
3621 | + for (i = 5 - bmp->db_agheight, bmp->db_agstart = 0, n = 1; i > 0; | |
3622 | 3622 | i--) { |
3623 | 3623 | bmp->db_agstart += n; |
3624 | 3624 | n <<= 2; |
fs/jfs/jfs_dmap.h
... | ... | @@ -210,7 +210,7 @@ |
210 | 210 | __le32 dn_maxag; /* 4: max active alloc group number */ |
211 | 211 | __le32 dn_agpref; /* 4: preferred alloc group (hint) */ |
212 | 212 | __le32 dn_aglevel; /* 4: dmapctl level holding the AG */ |
213 | - __le32 dn_agheigth; /* 4: height in dmapctl of the AG */ | |
213 | + __le32 dn_agheight; /* 4: height in dmapctl of the AG */ | |
214 | 214 | __le32 dn_agwidth; /* 4: width in dmapctl of the AG */ |
215 | 215 | __le32 dn_agstart; /* 4: start tree index at AG height */ |
216 | 216 | __le32 dn_agl2size; /* 4: l2 num of blks per alloc group */ |
... | ... | @@ -229,7 +229,7 @@ |
229 | 229 | int dn_maxag; /* max active alloc group number */ |
230 | 230 | int dn_agpref; /* preferred alloc group (hint) */ |
231 | 231 | int dn_aglevel; /* dmapctl level holding the AG */ |
232 | - int dn_agheigth; /* height in dmapctl of the AG */ | |
232 | + int dn_agheight; /* height in dmapctl of the AG */ | |
233 | 233 | int dn_agwidth; /* width in dmapctl of the AG */ |
234 | 234 | int dn_agstart; /* start tree index at AG height */ |
235 | 235 | int dn_agl2size; /* l2 num of blks per alloc group */ |
... | ... | @@ -255,7 +255,7 @@ |
255 | 255 | #define db_agsize db_bmap.dn_agsize |
256 | 256 | #define db_agl2size db_bmap.dn_agl2size |
257 | 257 | #define db_agwidth db_bmap.dn_agwidth |
258 | -#define db_agheigth db_bmap.dn_agheigth | |
258 | +#define db_agheight db_bmap.dn_agheight | |
259 | 259 | #define db_agstart db_bmap.dn_agstart |
260 | 260 | #define db_numag db_bmap.dn_numag |
261 | 261 | #define db_maxlevel db_bmap.dn_maxlevel |
fs/jfs/jfs_inode.h
... | ... | @@ -48,6 +48,7 @@ |
48 | 48 | extern const struct inode_operations jfs_file_inode_operations; |
49 | 49 | extern const struct file_operations jfs_file_operations; |
50 | 50 | extern const struct inode_operations jfs_symlink_inode_operations; |
51 | +extern const struct inode_operations jfs_fast_symlink_inode_operations; | |
51 | 52 | extern const struct dentry_operations jfs_ci_dentry_operations; |
52 | 53 | #endif /* _H_JFS_INODE */ |
fs/jfs/namei.c
... | ... | @@ -956,7 +956,7 @@ |
956 | 956 | */ |
957 | 957 | |
958 | 958 | if (ssize <= IDATASIZE) { |
959 | - ip->i_op = &jfs_symlink_inode_operations; | |
959 | + ip->i_op = &jfs_fast_symlink_inode_operations; | |
960 | 960 | |
961 | 961 | i_fastsymlink = JFS_IP(ip)->i_inline; |
962 | 962 | memcpy(i_fastsymlink, name, ssize); |
... | ... | @@ -978,7 +978,7 @@ |
978 | 978 | else { |
979 | 979 | jfs_info("jfs_symlink: allocate extent ip:0x%p", ip); |
980 | 980 | |
981 | - ip->i_op = &page_symlink_inode_operations; | |
981 | + ip->i_op = &jfs_symlink_inode_operations; | |
982 | 982 | ip->i_mapping->a_ops = &jfs_aops; |
983 | 983 | |
984 | 984 | /* |
fs/jfs/resize.c
... | ... | @@ -81,6 +81,7 @@ |
81 | 81 | struct inode *iplist[1]; |
82 | 82 | struct jfs_superblock *j_sb, *j_sb2; |
83 | 83 | uint old_agsize; |
84 | + int agsizechanged = 0; | |
84 | 85 | struct buffer_head *bh, *bh2; |
85 | 86 | |
86 | 87 | /* If the volume hasn't grown, get out now */ |
... | ... | @@ -333,6 +334,9 @@ |
333 | 334 | */ |
334 | 335 | if ((rc = dbExtendFS(ipbmap, XAddress, nblocks))) |
335 | 336 | goto error_out; |
337 | + | |
338 | + agsizechanged |= (bmp->db_agsize != old_agsize); | |
339 | + | |
336 | 340 | /* |
337 | 341 | * the map now has extended to cover additional nblocks: |
338 | 342 | * dn_mapsize = oldMapsize + nblocks; |
... | ... | @@ -432,7 +436,7 @@ |
432 | 436 | * will correctly identify the new ag); |
433 | 437 | */ |
434 | 438 | /* if new AG size the same as old AG size, done! */ |
435 | - if (bmp->db_agsize != old_agsize) { | |
439 | + if (agsizechanged) { | |
436 | 440 | if ((rc = diExtendFS(ipimap, ipbmap))) |
437 | 441 | goto error_out; |
438 | 442 |
fs/jfs/symlink.c
... | ... | @@ -29,9 +29,21 @@ |
29 | 29 | return NULL; |
30 | 30 | } |
31 | 31 | |
32 | -const struct inode_operations jfs_symlink_inode_operations = { | |
32 | +const struct inode_operations jfs_fast_symlink_inode_operations = { | |
33 | 33 | .readlink = generic_readlink, |
34 | 34 | .follow_link = jfs_follow_link, |
35 | + .setattr = jfs_setattr, | |
36 | + .setxattr = jfs_setxattr, | |
37 | + .getxattr = jfs_getxattr, | |
38 | + .listxattr = jfs_listxattr, | |
39 | + .removexattr = jfs_removexattr, | |
40 | +}; | |
41 | + | |
42 | +const struct inode_operations jfs_symlink_inode_operations = { | |
43 | + .readlink = generic_readlink, | |
44 | + .follow_link = page_follow_link_light, | |
45 | + .put_link = page_put_link, | |
46 | + .setattr = jfs_setattr, | |
35 | 47 | .setxattr = jfs_setxattr, |
36 | 48 | .getxattr = jfs_getxattr, |
37 | 49 | .listxattr = jfs_listxattr, |