aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-03-29 11:55:36 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-29 11:55:36 -0500
commite71ac6032edf77a1e4a81f3e3b260807e94b37a5 (patch)
tree62dc600d81f214d44b9e42c0c2316e1a2259c5e9 /fs
parent224b148ef7c9a00642eb33dbdf62f2840bde974f (diff)
parentc25366680bab32efcbb5eda5f3c202099ba27b81 (diff)
Merge git://oss.sgi.com:8090/oss/git/xfs-2.6
* git://oss.sgi.com:8090/oss/git/xfs-2.6: [XFS] Cleanup in XFS after recent get_block_t interface tweaks. [XFS] Remove unused/obsoleted function: xfs_bmap_do_search_extents() [XFS] A change to inode chunk allocation to try allocating the new chunk Fixes a regression from the recent "remove ->get_blocks() support" [XFS] Fix compiler warning and small code inconsistencies in compat [XFS] We really suck at spulling. Thanks to Chris Pascoe for fixing all
Diffstat (limited to 'fs')
-rw-r--r--fs/direct-io.c7
-rw-r--r--fs/xfs/linux-2.6/mrlock.h2
-rw-r--r--fs/xfs/linux-2.6/xfs_aops.c67
-rw-r--r--fs/xfs/linux-2.6/xfs_aops.h2
-rw-r--r--fs/xfs/linux-2.6/xfs_export.h2
-rw-r--r--fs/xfs/linux-2.6/xfs_ioctl32.c22
-rw-r--r--fs/xfs/linux-2.6/xfs_iops.c2
-rw-r--r--fs/xfs/linux-2.6/xfs_lrw.c2
-rw-r--r--fs/xfs/linux-2.6/xfs_vfs.h2
-rw-r--r--fs/xfs/quota/xfs_dquot_item.c2
-rw-r--r--fs/xfs/quota/xfs_qm.c14
-rw-r--r--fs/xfs/quota/xfs_qm_syscalls.c2
-rw-r--r--fs/xfs/quota/xfs_trans_dquot.c2
-rw-r--r--fs/xfs/xfs_acl.c2
-rw-r--r--fs/xfs/xfs_ag.h2
-rw-r--r--fs/xfs/xfs_alloc.c6
-rw-r--r--fs/xfs/xfs_alloc.h2
-rw-r--r--fs/xfs/xfs_attr.c6
-rw-r--r--fs/xfs/xfs_attr_leaf.c4
-rw-r--r--fs/xfs/xfs_behavior.c4
-rw-r--r--fs/xfs/xfs_behavior.h4
-rw-r--r--fs/xfs/xfs_bmap.c107
-rw-r--r--fs/xfs/xfs_bmap.h8
-rw-r--r--fs/xfs/xfs_buf_item.c4
-rw-r--r--fs/xfs/xfs_cap.h2
-rw-r--r--fs/xfs/xfs_da_btree.c2
-rw-r--r--fs/xfs/xfs_dir2_block.c2
-rw-r--r--fs/xfs/xfs_dir2_leaf.c2
-rw-r--r--fs/xfs/xfs_dir2_node.c2
-rw-r--r--fs/xfs/xfs_dir_leaf.c2
-rw-r--r--fs/xfs/xfs_fsops.c2
-rw-r--r--fs/xfs/xfs_ialloc.c110
-rw-r--r--fs/xfs/xfs_iget.c2
-rw-r--r--fs/xfs/xfs_inode.c14
-rw-r--r--fs/xfs/xfs_inode_item.c2
-rw-r--r--fs/xfs/xfs_itable.c4
-rw-r--r--fs/xfs/xfs_itable.h2
-rw-r--r--fs/xfs/xfs_log.c22
-rw-r--r--fs/xfs/xfs_log.h2
-rw-r--r--fs/xfs/xfs_log_recover.c4
-rw-r--r--fs/xfs/xfs_mount.c4
-rw-r--r--fs/xfs/xfs_mount.h2
-rw-r--r--fs/xfs/xfs_quota.h4
-rw-r--r--fs/xfs/xfs_trans.c6
-rw-r--r--fs/xfs/xfs_trans.h2
-rw-r--r--fs/xfs/xfs_trans_inode.c2
-rw-r--r--fs/xfs/xfs_vfsops.c10
-rw-r--r--fs/xfs/xfs_vnodeops.c12
48 files changed, 204 insertions, 291 deletions
diff --git a/fs/direct-io.c b/fs/direct-io.c
index 9d1d2aa73e42..910a8ed74b5d 100644
--- a/fs/direct-io.c
+++ b/fs/direct-io.c
@@ -524,8 +524,6 @@ static int get_more_blocks(struct dio *dio)
524 */ 524 */
525 ret = dio->page_errors; 525 ret = dio->page_errors;
526 if (ret == 0) { 526 if (ret == 0) {
527 map_bh->b_state = 0;
528 map_bh->b_size = 0;
529 BUG_ON(dio->block_in_file >= dio->final_block_in_request); 527 BUG_ON(dio->block_in_file >= dio->final_block_in_request);
530 fs_startblk = dio->block_in_file >> dio->blkfactor; 528 fs_startblk = dio->block_in_file >> dio->blkfactor;
531 dio_count = dio->final_block_in_request - dio->block_in_file; 529 dio_count = dio->final_block_in_request - dio->block_in_file;
@@ -534,6 +532,9 @@ static int get_more_blocks(struct dio *dio)
534 if (dio_count & blkmask) 532 if (dio_count & blkmask)
535 fs_count++; 533 fs_count++;
536 534
535 map_bh->b_state = 0;
536 map_bh->b_size = fs_count << dio->inode->i_blkbits;
537
537 create = dio->rw == WRITE; 538 create = dio->rw == WRITE;
538 if (dio->lock_type == DIO_LOCKING) { 539 if (dio->lock_type == DIO_LOCKING) {
539 if (dio->block_in_file < (i_size_read(dio->inode) >> 540 if (dio->block_in_file < (i_size_read(dio->inode) >>
@@ -542,13 +543,13 @@ static int get_more_blocks(struct dio *dio)
542 } else if (dio->lock_type == DIO_NO_LOCKING) { 543 } else if (dio->lock_type == DIO_NO_LOCKING) {
543 create = 0; 544 create = 0;
544 } 545 }
546
545 /* 547 /*
546 * For writes inside i_size we forbid block creations: only 548 * For writes inside i_size we forbid block creations: only
547 * overwrites are permitted. We fall back to buffered writes 549 * overwrites are permitted. We fall back to buffered writes
548 * at a higher level for inside-i_size block-instantiating 550 * at a higher level for inside-i_size block-instantiating
549 * writes. 551 * writes.
550 */ 552 */
551 map_bh->b_size = fs_count << dio->blkbits;
552 ret = (*dio->get_block)(dio->inode, fs_startblk, 553 ret = (*dio->get_block)(dio->inode, fs_startblk,
553 map_bh, create); 554 map_bh, create);
554 } 555 }
diff --git a/fs/xfs/linux-2.6/mrlock.h b/fs/xfs/linux-2.6/mrlock.h
index 16b44c3c2362..1b262b790d9c 100644
--- a/fs/xfs/linux-2.6/mrlock.h
+++ b/fs/xfs/linux-2.6/mrlock.h
@@ -79,7 +79,7 @@ static inline void mrdemote(mrlock_t *mrp)
79 * Debug-only routine, without some platform-specific asm code, we can 79 * Debug-only routine, without some platform-specific asm code, we can
80 * now only answer requests regarding whether we hold the lock for write 80 * now only answer requests regarding whether we hold the lock for write
81 * (reader state is outside our visibility, we only track writer state). 81 * (reader state is outside our visibility, we only track writer state).
82 * Note: means !ismrlocked would give false positivies, so don't do that. 82 * Note: means !ismrlocked would give false positives, so don't do that.
83 */ 83 */
84static inline int ismrlocked(mrlock_t *mrp, int type) 84static inline int ismrlocked(mrlock_t *mrp, int type)
85{ 85{
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c
index c02f7c5b7462..6cbbd165c60d 100644
--- a/fs/xfs/linux-2.6/xfs_aops.c
+++ b/fs/xfs/linux-2.6/xfs_aops.c
@@ -372,7 +372,7 @@ static inline int bio_add_buffer(struct bio *bio, struct buffer_head *bh)
372 * assumes that all buffers on the page are started at the same time. 372 * assumes that all buffers on the page are started at the same time.
373 * 373 *
374 * The fix is two passes across the ioend list - one to start writeback on the 374 * The fix is two passes across the ioend list - one to start writeback on the
375 * bufferheads, and then the second one submit them for I/O. 375 * buffer_heads, and then submit them for I/O on the second pass.
376 */ 376 */
377STATIC void 377STATIC void
378xfs_submit_ioend( 378xfs_submit_ioend(
@@ -699,7 +699,7 @@ xfs_convert_page(
699 699
700 /* 700 /*
701 * page_dirty is initially a count of buffers on the page before 701 * page_dirty is initially a count of buffers on the page before
702 * EOF and is decrememted as we move each into a cleanable state. 702 * EOF and is decremented as we move each into a cleanable state.
703 * 703 *
704 * Derivation: 704 * Derivation:
705 * 705 *
@@ -842,7 +842,7 @@ xfs_cluster_write(
842 * page if possible. 842 * page if possible.
843 * The bh->b_state's cannot know if any of the blocks or which block for 843 * The bh->b_state's cannot know if any of the blocks or which block for
844 * that matter are dirty due to mmap writes, and therefore bh uptodate is 844 * that matter are dirty due to mmap writes, and therefore bh uptodate is
845 * only vaild if the page itself isn't completely uptodate. Some layers 845 * only valid if the page itself isn't completely uptodate. Some layers
846 * may clear the page dirty flag prior to calling write page, under the 846 * may clear the page dirty flag prior to calling write page, under the
847 * assumption the entire page will be written out; by not writing out the 847 * assumption the entire page will be written out; by not writing out the
848 * whole page the page can be reused before all valid dirty data is 848 * whole page the page can be reused before all valid dirty data is
@@ -892,7 +892,7 @@ xfs_page_state_convert(
892 892
893 /* 893 /*
894 * page_dirty is initially a count of buffers on the page before 894 * page_dirty is initially a count of buffers on the page before
895 * EOF and is decrememted as we move each into a cleanable state. 895 * EOF and is decremented as we move each into a cleanable state.
896 * 896 *
897 * Derivation: 897 * Derivation:
898 * 898 *
@@ -1223,10 +1223,9 @@ free_buffers:
1223} 1223}
1224 1224
1225STATIC int 1225STATIC int
1226__xfs_get_block( 1226__xfs_get_blocks(
1227 struct inode *inode, 1227 struct inode *inode,
1228 sector_t iblock, 1228 sector_t iblock,
1229 unsigned long blocks,
1230 struct buffer_head *bh_result, 1229 struct buffer_head *bh_result,
1231 int create, 1230 int create,
1232 int direct, 1231 int direct,
@@ -1236,22 +1235,17 @@ __xfs_get_block(
1236 xfs_iomap_t iomap; 1235 xfs_iomap_t iomap;
1237 xfs_off_t offset; 1236 xfs_off_t offset;
1238 ssize_t size; 1237 ssize_t size;
1239 int retpbbm = 1; 1238 int niomap = 1;
1240 int error; 1239 int error;
1241 1240
1242 offset = (xfs_off_t)iblock << inode->i_blkbits; 1241 offset = (xfs_off_t)iblock << inode->i_blkbits;
1243 if (blocks) 1242 ASSERT(bh_result->b_size >= (1 << inode->i_blkbits));
1244 size = (ssize_t) min_t(xfs_off_t, LONG_MAX, 1243 size = bh_result->b_size;
1245 (xfs_off_t)blocks << inode->i_blkbits);
1246 else
1247 size = 1 << inode->i_blkbits;
1248
1249 VOP_BMAP(vp, offset, size, 1244 VOP_BMAP(vp, offset, size,
1250 create ? flags : BMAPI_READ, &iomap, &retpbbm, error); 1245 create ? flags : BMAPI_READ, &iomap, &niomap, error);
1251 if (error) 1246 if (error)
1252 return -error; 1247 return -error;
1253 1248 if (niomap == 0)
1254 if (retpbbm == 0)
1255 return 0; 1249 return 0;
1256 1250
1257 if (iomap.iomap_bn != IOMAP_DADDR_NULL) { 1251 if (iomap.iomap_bn != IOMAP_DADDR_NULL) {
@@ -1271,12 +1265,16 @@ __xfs_get_block(
1271 } 1265 }
1272 } 1266 }
1273 1267
1274 /* If this is a realtime file, data might be on a new device */ 1268 /*
1269 * If this is a realtime file, data may be on a different device.
1270 * to that pointed to from the buffer_head b_bdev currently.
1271 */
1275 bh_result->b_bdev = iomap.iomap_target->bt_bdev; 1272 bh_result->b_bdev = iomap.iomap_target->bt_bdev;
1276 1273
1277 /* If we previously allocated a block out beyond eof and 1274 /*
1278 * we are now coming back to use it then we will need to 1275 * If we previously allocated a block out beyond eof and we are
1279 * flag it as new even if it has a disk address. 1276 * now coming back to use it then we will need to flag it as new
1277 * even if it has a disk address.
1280 */ 1278 */
1281 if (create && 1279 if (create &&
1282 ((!buffer_mapped(bh_result) && !buffer_uptodate(bh_result)) || 1280 ((!buffer_mapped(bh_result) && !buffer_uptodate(bh_result)) ||
@@ -1292,26 +1290,24 @@ __xfs_get_block(
1292 } 1290 }
1293 } 1291 }
1294 1292
1295 if (blocks) { 1293 if (direct || size > (1 << inode->i_blkbits)) {
1296 ASSERT(iomap.iomap_bsize - iomap.iomap_delta > 0); 1294 ASSERT(iomap.iomap_bsize - iomap.iomap_delta > 0);
1297 offset = min_t(xfs_off_t, 1295 offset = min_t(xfs_off_t,
1298 iomap.iomap_bsize - iomap.iomap_delta, 1296 iomap.iomap_bsize - iomap.iomap_delta, size);
1299 (xfs_off_t)blocks << inode->i_blkbits); 1297 bh_result->b_size = (ssize_t)min_t(xfs_off_t, LONG_MAX, offset);
1300 bh_result->b_size = (u32) min_t(xfs_off_t, UINT_MAX, offset);
1301 } 1298 }
1302 1299
1303 return 0; 1300 return 0;
1304} 1301}
1305 1302
1306int 1303int
1307xfs_get_block( 1304xfs_get_blocks(
1308 struct inode *inode, 1305 struct inode *inode,
1309 sector_t iblock, 1306 sector_t iblock,
1310 struct buffer_head *bh_result, 1307 struct buffer_head *bh_result,
1311 int create) 1308 int create)
1312{ 1309{
1313 return __xfs_get_block(inode, iblock, 1310 return __xfs_get_blocks(inode, iblock,
1314 bh_result->b_size >> inode->i_blkbits,
1315 bh_result, create, 0, BMAPI_WRITE); 1311 bh_result, create, 0, BMAPI_WRITE);
1316} 1312}
1317 1313
@@ -1322,8 +1318,7 @@ xfs_get_blocks_direct(
1322 struct buffer_head *bh_result, 1318 struct buffer_head *bh_result,
1323 int create) 1319 int create)
1324{ 1320{
1325 return __xfs_get_block(inode, iblock, 1321 return __xfs_get_blocks(inode, iblock,
1326 bh_result->b_size >> inode->i_blkbits,
1327 bh_result, create, 1, BMAPI_WRITE|BMAPI_DIRECT); 1322 bh_result, create, 1, BMAPI_WRITE|BMAPI_DIRECT);
1328} 1323}
1329 1324
@@ -1339,9 +1334,9 @@ xfs_end_io_direct(
1339 /* 1334 /*
1340 * Non-NULL private data means we need to issue a transaction to 1335 * Non-NULL private data means we need to issue a transaction to
1341 * convert a range from unwritten to written extents. This needs 1336 * convert a range from unwritten to written extents. This needs
1342 * to happen from process contect but aio+dio I/O completion 1337 * to happen from process context but aio+dio I/O completion
1343 * happens from irq context so we need to defer it to a workqueue. 1338 * happens from irq context so we need to defer it to a workqueue.
1344 * This is not nessecary for synchronous direct I/O, but we do 1339 * This is not necessary for synchronous direct I/O, but we do
1345 * it anyway to keep the code uniform and simpler. 1340 * it anyway to keep the code uniform and simpler.
1346 * 1341 *
1347 * The core direct I/O code might be changed to always call the 1342 * The core direct I/O code might be changed to always call the
@@ -1358,7 +1353,7 @@ xfs_end_io_direct(
1358 } 1353 }
1359 1354
1360 /* 1355 /*
1361 * blockdev_direct_IO can return an error even afer the I/O 1356 * blockdev_direct_IO can return an error even after the I/O
1362 * completion handler was called. Thus we need to protect 1357 * completion handler was called. Thus we need to protect
1363 * against double-freeing. 1358 * against double-freeing.
1364 */ 1359 */
@@ -1405,7 +1400,7 @@ xfs_vm_prepare_write(
1405 unsigned int from, 1400 unsigned int from,
1406 unsigned int to) 1401 unsigned int to)
1407{ 1402{
1408 return block_prepare_write(page, from, to, xfs_get_block); 1403 return block_prepare_write(page, from, to, xfs_get_blocks);
1409} 1404}
1410 1405
1411STATIC sector_t 1406STATIC sector_t
@@ -1422,7 +1417,7 @@ xfs_vm_bmap(
1422 VOP_RWLOCK(vp, VRWLOCK_READ); 1417 VOP_RWLOCK(vp, VRWLOCK_READ);
1423 VOP_FLUSH_PAGES(vp, (xfs_off_t)0, -1, 0, FI_REMAPF, error); 1418 VOP_FLUSH_PAGES(vp, (xfs_off_t)0, -1, 0, FI_REMAPF, error);
1424 VOP_RWUNLOCK(vp, VRWLOCK_READ); 1419 VOP_RWUNLOCK(vp, VRWLOCK_READ);
1425 return generic_block_bmap(mapping, block, xfs_get_block); 1420 return generic_block_bmap(mapping, block, xfs_get_blocks);
1426} 1421}
1427 1422
1428STATIC int 1423STATIC int
@@ -1430,7 +1425,7 @@ xfs_vm_readpage(
1430 struct file *unused, 1425 struct file *unused,
1431 struct page *page) 1426 struct page *page)
1432{ 1427{
1433 return mpage_readpage(page, xfs_get_block); 1428 return mpage_readpage(page, xfs_get_blocks);
1434} 1429}
1435 1430
1436STATIC int 1431STATIC int
@@ -1440,7 +1435,7 @@ xfs_vm_readpages(
1440 struct list_head *pages, 1435 struct list_head *pages,
1441 unsigned nr_pages) 1436 unsigned nr_pages)
1442{ 1437{
1443 return mpage_readpages(mapping, pages, nr_pages, xfs_get_block); 1438 return mpage_readpages(mapping, pages, nr_pages, xfs_get_blocks);
1444} 1439}
1445 1440
1446STATIC void 1441STATIC void
diff --git a/fs/xfs/linux-2.6/xfs_aops.h b/fs/xfs/linux-2.6/xfs_aops.h
index 795699f121d2..60716543c68b 100644
--- a/fs/xfs/linux-2.6/xfs_aops.h
+++ b/fs/xfs/linux-2.6/xfs_aops.h
@@ -41,6 +41,6 @@ typedef struct xfs_ioend {
41} xfs_ioend_t; 41} xfs_ioend_t;
42 42
43extern struct address_space_operations xfs_address_space_operations; 43extern struct address_space_operations xfs_address_space_operations;
44extern int xfs_get_block(struct inode *, sector_t, struct buffer_head *, int); 44extern int xfs_get_blocks(struct inode *, sector_t, struct buffer_head *, int);
45 45
46#endif /* __XFS_IOPS_H__ */ 46#endif /* __XFS_IOPS_H__ */
diff --git a/fs/xfs/linux-2.6/xfs_export.h b/fs/xfs/linux-2.6/xfs_export.h
index e5b0559700a4..e794ca4efc76 100644
--- a/fs/xfs/linux-2.6/xfs_export.h
+++ b/fs/xfs/linux-2.6/xfs_export.h
@@ -54,7 +54,7 @@
54 * Note, the NFS filehandle also includes an fsid portion which 54 * Note, the NFS filehandle also includes an fsid portion which
55 * may have an inode number in it. That number is hardcoded to 55 * may have an inode number in it. That number is hardcoded to
56 * 32bits and there is no way for XFS to intercept it. In 56 * 32bits and there is no way for XFS to intercept it. In
57 * practice this means when exporting an XFS filesytem with 64bit 57 * practice this means when exporting an XFS filesystem with 64bit
58 * inodes you should either export the mountpoint (rather than 58 * inodes you should either export the mountpoint (rather than
59 * a subdirectory) or use the "fsid" export option. 59 * a subdirectory) or use the "fsid" export option.
60 */ 60 */
diff --git a/fs/xfs/linux-2.6/xfs_ioctl32.c b/fs/xfs/linux-2.6/xfs_ioctl32.c
index b6321abd9a81..251bfe451a3f 100644
--- a/fs/xfs/linux-2.6/xfs_ioctl32.c
+++ b/fs/xfs/linux-2.6/xfs_ioctl32.c
@@ -72,7 +72,7 @@ xfs_ioctl32_flock(
72 copy_in_user(&p->l_pid, &p32->l_pid, sizeof(u32)) || 72 copy_in_user(&p->l_pid, &p32->l_pid, sizeof(u32)) ||
73 copy_in_user(&p->l_pad, &p32->l_pad, 4*sizeof(u32))) 73 copy_in_user(&p->l_pad, &p32->l_pad, 4*sizeof(u32)))
74 return -EFAULT; 74 return -EFAULT;
75 75
76 return (unsigned long)p; 76 return (unsigned long)p;
77} 77}
78 78
@@ -107,11 +107,15 @@ xfs_ioctl32_bulkstat(
107#endif 107#endif
108 108
109STATIC long 109STATIC long
110xfs_compat_ioctl(int mode, struct file *f, unsigned cmd, unsigned long arg) 110xfs_compat_ioctl(
111 int mode,
112 struct file *file,
113 unsigned cmd,
114 unsigned long arg)
111{ 115{
116 struct inode *inode = file->f_dentry->d_inode;
117 vnode_t *vp = vn_from_inode(inode);
112 int error; 118 int error;
113 struct inode *inode = f->f_dentry->d_inode;
114 vnode_t *vp = vn_to_inode(inode);
115 119
116 switch (cmd) { 120 switch (cmd) {
117 case XFS_IOC_DIOINFO: 121 case XFS_IOC_DIOINFO:
@@ -189,7 +193,7 @@ xfs_compat_ioctl(int mode, struct file *f, unsigned cmd, unsigned long arg)
189 return -ENOIOCTLCMD; 193 return -ENOIOCTLCMD;
190 } 194 }
191 195
192 VOP_IOCTL(vp, inode, f, mode, cmd, (void __user *)arg, error); 196 VOP_IOCTL(vp, inode, file, mode, cmd, (void __user *)arg, error);
193 VMODIFY(vp); 197 VMODIFY(vp);
194 198
195 return error; 199 return error;
@@ -197,18 +201,18 @@ xfs_compat_ioctl(int mode, struct file *f, unsigned cmd, unsigned long arg)
197 201
198long 202long
199xfs_file_compat_ioctl( 203xfs_file_compat_ioctl(
200 struct file *f, 204 struct file *file,
201 unsigned cmd, 205 unsigned cmd,
202 unsigned long arg) 206 unsigned long arg)
203{ 207{
204 return xfs_compat_ioctl(0, f, cmd, arg); 208 return xfs_compat_ioctl(0, file, cmd, arg);
205} 209}
206 210
207long 211long
208xfs_file_compat_invis_ioctl( 212xfs_file_compat_invis_ioctl(
209 struct file *f, 213 struct file *file,
210 unsigned cmd, 214 unsigned cmd,
211 unsigned long arg) 215 unsigned long arg)
212{ 216{
213 return xfs_compat_ioctl(IO_INVIS, f, cmd, arg); 217 return xfs_compat_ioctl(IO_INVIS, file, cmd, arg);
214} 218}
diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c
index af487437bd7e..149237304fb6 100644
--- a/fs/xfs/linux-2.6/xfs_iops.c
+++ b/fs/xfs/linux-2.6/xfs_iops.c
@@ -708,7 +708,7 @@ STATIC void
708xfs_vn_truncate( 708xfs_vn_truncate(
709 struct inode *inode) 709 struct inode *inode)
710{ 710{
711 block_truncate_page(inode->i_mapping, inode->i_size, xfs_get_block); 711 block_truncate_page(inode->i_mapping, inode->i_size, xfs_get_blocks);
712} 712}
713 713
714STATIC int 714STATIC int
diff --git a/fs/xfs/linux-2.6/xfs_lrw.c b/fs/xfs/linux-2.6/xfs_lrw.c
index 0169360475c4..84ddf1893894 100644
--- a/fs/xfs/linux-2.6/xfs_lrw.c
+++ b/fs/xfs/linux-2.6/xfs_lrw.c
@@ -681,7 +681,7 @@ start:
681 eventsent = 1; 681 eventsent = 1;
682 682
683 /* 683 /*
684 * The iolock was dropped and reaquired in XFS_SEND_DATA 684 * The iolock was dropped and reacquired in XFS_SEND_DATA
685 * so we have to recheck the size when appending. 685 * so we have to recheck the size when appending.
686 * We will only "goto start;" once, since having sent the 686 * We will only "goto start;" once, since having sent the
687 * event prevents another call to XFS_SEND_DATA, which is 687 * event prevents another call to XFS_SEND_DATA, which is
diff --git a/fs/xfs/linux-2.6/xfs_vfs.h b/fs/xfs/linux-2.6/xfs_vfs.h
index 8fed356db055..841200c03092 100644
--- a/fs/xfs/linux-2.6/xfs_vfs.h
+++ b/fs/xfs/linux-2.6/xfs_vfs.h
@@ -92,7 +92,7 @@ typedef enum {
92#define SYNC_FSDATA 0x0020 /* flush fs data (e.g. superblocks) */ 92#define SYNC_FSDATA 0x0020 /* flush fs data (e.g. superblocks) */
93#define SYNC_REFCACHE 0x0040 /* prune some of the nfs ref cache */ 93#define SYNC_REFCACHE 0x0040 /* prune some of the nfs ref cache */
94#define SYNC_REMOUNT 0x0080 /* remount readonly, no dummy LRs */ 94#define SYNC_REMOUNT 0x0080 /* remount readonly, no dummy LRs */
95#define SYNC_QUIESCE 0x0100 /* quiesce fileystem for a snapshot */ 95#define SYNC_QUIESCE 0x0100 /* quiesce filesystem for a snapshot */
96 96
97typedef int (*vfs_mount_t)(bhv_desc_t *, 97typedef int (*vfs_mount_t)(bhv_desc_t *,
98 struct xfs_mount_args *, struct cred *); 98 struct xfs_mount_args *, struct cred *);
diff --git a/fs/xfs/quota/xfs_dquot_item.c b/fs/xfs/quota/xfs_dquot_item.c
index e4e5f05b841b..546f48af882a 100644
--- a/fs/xfs/quota/xfs_dquot_item.c
+++ b/fs/xfs/quota/xfs_dquot_item.c
@@ -221,7 +221,7 @@ xfs_qm_dqunpin_wait(
221 * as possible. 221 * as possible.
222 * 222 *
223 * We must not be holding the AIL_LOCK at this point. Calling incore() to 223 * We must not be holding the AIL_LOCK at this point. Calling incore() to
224 * search the buffercache can be a time consuming thing, and AIL_LOCK is a 224 * search the buffer cache can be a time consuming thing, and AIL_LOCK is a
225 * spinlock. 225 * spinlock.
226 */ 226 */
227STATIC void 227STATIC void
diff --git a/fs/xfs/quota/xfs_qm.c b/fs/xfs/quota/xfs_qm.c
index 1fb757ef3f41..73c1e5e80c07 100644
--- a/fs/xfs/quota/xfs_qm.c
+++ b/fs/xfs/quota/xfs_qm.c
@@ -289,7 +289,7 @@ xfs_qm_rele_quotafs_ref(
289 289
290/* 290/*
291 * This is called at mount time from xfs_mountfs to initialize the quotainfo 291 * This is called at mount time from xfs_mountfs to initialize the quotainfo
292 * structure and start the global quotamanager (xfs_Gqm) if it hasn't done 292 * structure and start the global quota manager (xfs_Gqm) if it hasn't done
293 * so already. Note that the superblock has not been read in yet. 293 * so already. Note that the superblock has not been read in yet.
294 */ 294 */
295void 295void
@@ -807,7 +807,7 @@ xfs_qm_dqattach_one(
807 * Given a udquot and gdquot, attach a ptr to the group dquot in the 807 * Given a udquot and gdquot, attach a ptr to the group dquot in the
808 * udquot as a hint for future lookups. The idea sounds simple, but the 808 * udquot as a hint for future lookups. The idea sounds simple, but the
809 * execution isn't, because the udquot might have a group dquot attached 809 * execution isn't, because the udquot might have a group dquot attached
810 * already and getting rid of that gets us into lock ordering contraints. 810 * already and getting rid of that gets us into lock ordering constraints.
811 * The process is complicated more by the fact that the dquots may or may not 811 * The process is complicated more by the fact that the dquots may or may not
812 * be locked on entry. 812 * be locked on entry.
813 */ 813 */
@@ -1094,10 +1094,10 @@ xfs_qm_sync(
1094 } 1094 }
1095 /* 1095 /*
1096 * If we can't grab the flush lock then if the caller 1096 * If we can't grab the flush lock then if the caller
1097 * really wanted us to give this our best shot, 1097 * really wanted us to give this our best shot, so
1098 * see if we can give a push to the buffer before we wait 1098 * see if we can give a push to the buffer before we wait
1099 * on the flush lock. At this point, we know that 1099 * on the flush lock. At this point, we know that
1100 * eventhough the dquot is being flushed, 1100 * even though the dquot is being flushed,
1101 * it has (new) dirty data. 1101 * it has (new) dirty data.
1102 */ 1102 */
1103 xfs_qm_dqflock_pushbuf_wait(dqp); 1103 xfs_qm_dqflock_pushbuf_wait(dqp);
@@ -1491,7 +1491,7 @@ xfs_qm_reset_dqcounts(
1491 /* 1491 /*
1492 * Do a sanity check, and if needed, repair the dqblk. Don't 1492 * Do a sanity check, and if needed, repair the dqblk. Don't
1493 * output any warnings because it's perfectly possible to 1493 * output any warnings because it's perfectly possible to
1494 * find unitialized dquot blks. See comment in xfs_qm_dqcheck. 1494 * find uninitialised dquot blks. See comment in xfs_qm_dqcheck.
1495 */ 1495 */
1496 (void) xfs_qm_dqcheck(ddq, id+j, type, XFS_QMOPT_DQREPAIR, 1496 (void) xfs_qm_dqcheck(ddq, id+j, type, XFS_QMOPT_DQREPAIR,
1497 "xfs_quotacheck"); 1497 "xfs_quotacheck");
@@ -1580,7 +1580,7 @@ xfs_qm_dqiterate(
1580 1580
1581 error = 0; 1581 error = 0;
1582 /* 1582 /*
1583 * This looks racey, but we can't keep an inode lock across a 1583 * This looks racy, but we can't keep an inode lock across a
1584 * trans_reserve. But, this gets called during quotacheck, and that 1584 * trans_reserve. But, this gets called during quotacheck, and that
1585 * happens only at mount time which is single threaded. 1585 * happens only at mount time which is single threaded.
1586 */ 1586 */
@@ -1824,7 +1824,7 @@ xfs_qm_dqusage_adjust(
1824 * we have to start from the beginning anyway. 1824 * we have to start from the beginning anyway.
1825 * Once we're done, we'll log all the dquot bufs. 1825 * Once we're done, we'll log all the dquot bufs.
1826 * 1826 *
1827 * The *QUOTA_ON checks below may look pretty racey, but quotachecks 1827 * The *QUOTA_ON checks below may look pretty racy, but quotachecks
1828 * and quotaoffs don't race. (Quotachecks happen at mount time only). 1828 * and quotaoffs don't race. (Quotachecks happen at mount time only).
1829 */ 1829 */
1830 if (XFS_IS_UQUOTA_ON(mp)) { 1830 if (XFS_IS_UQUOTA_ON(mp)) {
diff --git a/fs/xfs/quota/xfs_qm_syscalls.c b/fs/xfs/quota/xfs_qm_syscalls.c
index 676884394aae..c55db463bbf2 100644
--- a/fs/xfs/quota/xfs_qm_syscalls.c
+++ b/fs/xfs/quota/xfs_qm_syscalls.c
@@ -912,7 +912,7 @@ xfs_qm_export_dquot(
912 912
913 /* 913 /*
914 * Internally, we don't reset all the timers when quota enforcement 914 * Internally, we don't reset all the timers when quota enforcement
915 * gets turned off. No need to confuse the userlevel code, 915 * gets turned off. No need to confuse the user level code,
916 * so return zeroes in that case. 916 * so return zeroes in that case.
917 */ 917 */
918 if (! XFS_IS_QUOTA_ENFORCED(mp)) { 918 if (! XFS_IS_QUOTA_ENFORCED(mp)) {
diff --git a/fs/xfs/quota/xfs_trans_dquot.c b/fs/xfs/quota/xfs_trans_dquot.c
index 3290975d31f7..d8e131ec0aa8 100644
--- a/fs/xfs/quota/xfs_trans_dquot.c
+++ b/fs/xfs/quota/xfs_trans_dquot.c
@@ -804,7 +804,7 @@ xfs_trans_reserve_quota_bydquots(
804 } 804 }
805 805
806 /* 806 /*
807 * Didnt change anything critical, so, no need to log 807 * Didn't change anything critical, so, no need to log
808 */ 808 */
809 return (0); 809 return (0);
810} 810}
diff --git a/fs/xfs/xfs_acl.c b/fs/xfs/xfs_acl.c
index 4ff0f4e41c61..2539af34eb63 100644
--- a/fs/xfs/xfs_acl.c
+++ b/fs/xfs/xfs_acl.c
@@ -395,7 +395,7 @@ xfs_acl_allow_set(
395 * The access control process to determine the access permission: 395 * The access control process to determine the access permission:
396 * if uid == file owner id, use the file owner bits. 396 * if uid == file owner id, use the file owner bits.
397 * if gid == file owner group id, use the file group bits. 397 * if gid == file owner group id, use the file group bits.
398 * scan ACL for a maching user or group, and use matched entry 398 * scan ACL for a matching user or group, and use matched entry
399 * permission. Use total permissions of all matching group entries, 399 * permission. Use total permissions of all matching group entries,
400 * until all acl entries are exhausted. The final permission produced 400 * until all acl entries are exhausted. The final permission produced
401 * by matching acl entry or entries needs to be & with group permission. 401 * by matching acl entry or entries needs to be & with group permission.
diff --git a/fs/xfs/xfs_ag.h b/fs/xfs/xfs_ag.h
index a96e2ffce0cc..dc2361dd740a 100644
--- a/fs/xfs/xfs_ag.h
+++ b/fs/xfs/xfs_ag.h
@@ -179,7 +179,7 @@ typedef struct xfs_perag
179{ 179{
180 char pagf_init; /* this agf's entry is initialized */ 180 char pagf_init; /* this agf's entry is initialized */
181 char pagi_init; /* this agi's entry is initialized */ 181 char pagi_init; /* this agi's entry is initialized */
182 char pagf_metadata; /* the agf is prefered to be metadata */ 182 char pagf_metadata; /* the agf is preferred to be metadata */
183 char pagi_inodeok; /* The agi is ok for inodes */ 183 char pagi_inodeok; /* The agi is ok for inodes */
184 __uint8_t pagf_levels[XFS_BTNUM_AGF]; 184 __uint8_t pagf_levels[XFS_BTNUM_AGF];
185 /* # of levels in bno & cnt btree */ 185 /* # of levels in bno & cnt btree */
diff --git a/fs/xfs/xfs_alloc.c b/fs/xfs/xfs_alloc.c
index f4328e1e2a74..64ee07db0d5e 100644
--- a/fs/xfs/xfs_alloc.c
+++ b/fs/xfs/xfs_alloc.c
@@ -511,7 +511,7 @@ STATIC void
511xfs_alloc_trace_busy( 511xfs_alloc_trace_busy(
512 char *name, /* function tag string */ 512 char *name, /* function tag string */
513 char *str, /* additional string */ 513 char *str, /* additional string */
514 xfs_mount_t *mp, /* file system mount poing */ 514 xfs_mount_t *mp, /* file system mount point */
515 xfs_agnumber_t agno, /* allocation group number */ 515 xfs_agnumber_t agno, /* allocation group number */
516 xfs_agblock_t agbno, /* a.g. relative block number */ 516 xfs_agblock_t agbno, /* a.g. relative block number */
517 xfs_extlen_t len, /* length of extent */ 517 xfs_extlen_t len, /* length of extent */
@@ -1843,7 +1843,7 @@ xfs_alloc_fix_freelist(
1843 } else 1843 } else
1844 agbp = NULL; 1844 agbp = NULL;
1845 1845
1846 /* If this is a metadata prefered pag and we are user data 1846 /* If this is a metadata preferred pag and we are user data
1847 * then try somewhere else if we are not being asked to 1847 * then try somewhere else if we are not being asked to
1848 * try harder at this point 1848 * try harder at this point
1849 */ 1849 */
@@ -2458,7 +2458,7 @@ error0:
2458/* 2458/*
2459 * AG Busy list management 2459 * AG Busy list management
2460 * The busy list contains block ranges that have been freed but whose 2460 * The busy list contains block ranges that have been freed but whose
2461 * transacations have not yet hit disk. If any block listed in a busy 2461 * transactions have not yet hit disk. If any block listed in a busy
2462 * list is reused, the transaction that freed it must be forced to disk 2462 * list is reused, the transaction that freed it must be forced to disk
2463 * before continuing to use the block. 2463 * before continuing to use the block.
2464 * 2464 *
diff --git a/fs/xfs/xfs_alloc.h b/fs/xfs/xfs_alloc.h
index 3546dea27b7d..2d1f8928b267 100644
--- a/fs/xfs/xfs_alloc.h
+++ b/fs/xfs/xfs_alloc.h
@@ -68,7 +68,7 @@ typedef struct xfs_alloc_arg {
68 xfs_alloctype_t otype; /* original allocation type */ 68 xfs_alloctype_t otype; /* original allocation type */
69 char wasdel; /* set if allocation was prev delayed */ 69 char wasdel; /* set if allocation was prev delayed */
70 char wasfromfl; /* set if allocation is from freelist */ 70 char wasfromfl; /* set if allocation is from freelist */
71 char isfl; /* set if is freelist blocks - !actg */ 71 char isfl; /* set if is freelist blocks - !acctg */
72 char userdata; /* set if this is user data */ 72 char userdata; /* set if this is user data */
73} xfs_alloc_arg_t; 73} xfs_alloc_arg_t;
74 74
diff --git a/fs/xfs/xfs_attr.c b/fs/xfs/xfs_attr.c
index 093fac476bda..b6e1e02bbb28 100644
--- a/fs/xfs/xfs_attr.c
+++ b/fs/xfs/xfs_attr.c
@@ -294,7 +294,7 @@ xfs_attr_set_int(xfs_inode_t *dp, const char *name, int namelen,
294 xfs_trans_ihold(args.trans, dp); 294 xfs_trans_ihold(args.trans, dp);
295 295
296 /* 296 /*
297 * If the attribute list is non-existant or a shortform list, 297 * If the attribute list is non-existent or a shortform list,
298 * upgrade it to a single-leaf-block attribute list. 298 * upgrade it to a single-leaf-block attribute list.
299 */ 299 */
300 if ((dp->i_d.di_aformat == XFS_DINODE_FMT_LOCAL) || 300 if ((dp->i_d.di_aformat == XFS_DINODE_FMT_LOCAL) ||
@@ -1584,7 +1584,7 @@ out:
1584 * Fill in the disk block numbers in the state structure for the buffers 1584 * Fill in the disk block numbers in the state structure for the buffers
1585 * that are attached to the state structure. 1585 * that are attached to the state structure.
1586 * This is done so that we can quickly reattach ourselves to those buffers 1586 * This is done so that we can quickly reattach ourselves to those buffers
1587 * after some set of transaction commit's has released these buffers. 1587 * after some set of transaction commits have released these buffers.
1588 */ 1588 */
1589STATIC int 1589STATIC int
1590xfs_attr_fillstate(xfs_da_state_t *state) 1590xfs_attr_fillstate(xfs_da_state_t *state)
@@ -1631,7 +1631,7 @@ xfs_attr_fillstate(xfs_da_state_t *state)
1631/* 1631/*
1632 * Reattach the buffers to the state structure based on the disk block 1632 * Reattach the buffers to the state structure based on the disk block
1633 * numbers stored in the state structure. 1633 * numbers stored in the state structure.
1634 * This is done after some set of transaction commit's has released those 1634 * This is done after some set of transaction commits have released those
1635 * buffers from our grip. 1635 * buffers from our grip.
1636 */ 1636 */
1637STATIC int 1637STATIC int
diff --git a/fs/xfs/xfs_attr_leaf.c b/fs/xfs/xfs_attr_leaf.c
index 717682747bd2..9462be86aa14 100644
--- a/fs/xfs/xfs_attr_leaf.c
+++ b/fs/xfs/xfs_attr_leaf.c
@@ -524,7 +524,7 @@ xfs_attr_shortform_compare(const void *a, const void *b)
524 524
525/* 525/*
526 * Copy out entries of shortform attribute lists for attr_list(). 526 * Copy out entries of shortform attribute lists for attr_list().
527 * Shortform atrtribute lists are not stored in hashval sorted order. 527 * Shortform attribute lists are not stored in hashval sorted order.
528 * If the output buffer is not large enough to hold them all, then we 528 * If the output buffer is not large enough to hold them all, then we
529 * we have to calculate each entries' hashvalue and sort them before 529 * we have to calculate each entries' hashvalue and sort them before
530 * we can begin returning them to the user. 530 * we can begin returning them to the user.
@@ -1541,7 +1541,7 @@ xfs_attr_leaf_toosmall(xfs_da_state_t *state, int *action)
1541 /* 1541 /*
1542 * Check for the degenerate case of the block being empty. 1542 * Check for the degenerate case of the block being empty.
1543 * If the block is empty, we'll simply delete it, no need to 1543 * If the block is empty, we'll simply delete it, no need to
1544 * coalesce it with a sibling block. We choose (aribtrarily) 1544 * coalesce it with a sibling block. We choose (arbitrarily)
1545 * to merge with the forward block unless it is NULL. 1545 * to merge with the forward block unless it is NULL.
1546 */ 1546 */
1547 if (count == 0) { 1547 if (count == 0) {
diff --git a/fs/xfs/xfs_behavior.c b/fs/xfs/xfs_behavior.c
index 9880adae3938..f4fe3715a803 100644
--- a/fs/xfs/xfs_behavior.c
+++ b/fs/xfs/xfs_behavior.c
@@ -31,7 +31,7 @@
31 * The behavior chain is ordered based on the 'position' number which 31 * The behavior chain is ordered based on the 'position' number which
32 * lives in the first field of the ops vector (higher numbers first). 32 * lives in the first field of the ops vector (higher numbers first).
33 * 33 *
34 * Attemps to insert duplicate ops result in an EINVAL return code. 34 * Attempts to insert duplicate ops result in an EINVAL return code.
35 * Otherwise, return 0 to indicate success. 35 * Otherwise, return 0 to indicate success.
36 */ 36 */
37int 37int
@@ -84,7 +84,7 @@ bhv_insert(bhv_head_t *bhp, bhv_desc_t *bdp)
84 84
85/* 85/*
86 * Remove a behavior descriptor from a position in a behavior chain; 86 * Remove a behavior descriptor from a position in a behavior chain;
87 * the postition is guaranteed not to be the first position. 87 * the position is guaranteed not to be the first position.
88 * Should only be called by the bhv_remove() macro. 88 * Should only be called by the bhv_remove() macro.
89 */ 89 */
90void 90void
diff --git a/fs/xfs/xfs_behavior.h b/fs/xfs/xfs_behavior.h
index 2cd89bb5ab10..1d8ff103201c 100644
--- a/fs/xfs/xfs_behavior.h
+++ b/fs/xfs/xfs_behavior.h
@@ -39,7 +39,7 @@
39 * behaviors is synchronized with operations-in-progress (oip's) so that 39 * behaviors is synchronized with operations-in-progress (oip's) so that
40 * the oip's always see a consistent view of the chain. 40 * the oip's always see a consistent view of the chain.
41 * 41 *
42 * The term "interpostion" is used to refer to the act of inserting 42 * The term "interposition" is used to refer to the act of inserting
43 * a behavior such that it interposes on (i.e., is inserted in front 43 * a behavior such that it interposes on (i.e., is inserted in front
44 * of) a particular other behavior. A key example of this is when a 44 * of) a particular other behavior. A key example of this is when a
45 * system implementing distributed single system image wishes to 45 * system implementing distributed single system image wishes to
@@ -51,7 +51,7 @@
51 * 51 *
52 * Behavior synchronization is logic which is necessary under certain 52 * Behavior synchronization is logic which is necessary under certain
53 * circumstances that there is no conflict between ongoing operations 53 * circumstances that there is no conflict between ongoing operations
54 * traversing the behavior chain and those dunamically modifying the 54 * traversing the behavior chain and those dynamically modifying the
55 * behavior chain. Because behavior synchronization adds extra overhead 55 * behavior chain. Because behavior synchronization adds extra overhead
56 * to virtual operation invocation, we want to restrict, as much as 56 * to virtual operation invocation, we want to restrict, as much as
57 * we can, the requirement for this extra code, to those situations 57 * we can, the requirement for this extra code, to those situations
diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c
index 2d702e4a74a3..d384e489705f 100644
--- a/fs/xfs/xfs_bmap.c
+++ b/fs/xfs/xfs_bmap.c
@@ -3467,113 +3467,6 @@ done:
3467 return error; 3467 return error;
3468} 3468}
3469 3469
3470xfs_bmbt_rec_t * /* pointer to found extent entry */
3471xfs_bmap_do_search_extents(
3472 xfs_bmbt_rec_t *base, /* base of extent list */
3473 xfs_extnum_t lastx, /* last extent index used */
3474 xfs_extnum_t nextents, /* number of file extents */
3475 xfs_fileoff_t bno, /* block number searched for */
3476 int *eofp, /* out: end of file found */
3477 xfs_extnum_t *lastxp, /* out: last extent index */
3478 xfs_bmbt_irec_t *gotp, /* out: extent entry found */
3479 xfs_bmbt_irec_t *prevp) /* out: previous extent entry found */
3480{
3481 xfs_bmbt_rec_t *ep; /* extent list entry pointer */
3482 xfs_bmbt_irec_t got; /* extent list entry, decoded */
3483 int high; /* high index of binary search */
3484 int low; /* low index of binary search */
3485
3486 /*
3487 * Initialize the extent entry structure to catch access to
3488 * uninitialized br_startblock field.
3489 */
3490 got.br_startoff = 0xffa5a5a5a5a5a5a5LL;
3491 got.br_blockcount = 0xa55a5a5a5a5a5a5aLL;
3492 got.br_state = XFS_EXT_INVALID;
3493
3494#if XFS_BIG_BLKNOS
3495 got.br_startblock = 0xffffa5a5a5a5a5a5LL;
3496#else
3497 got.br_startblock = 0xffffa5a5;
3498#endif
3499
3500 if (lastx != NULLEXTNUM && lastx < nextents)
3501 ep = base + lastx;
3502 else
3503 ep = NULL;
3504 prevp->br_startoff = NULLFILEOFF;
3505 if (ep && bno >= (got.br_startoff = xfs_bmbt_get_startoff(ep)) &&
3506 bno < got.br_startoff +
3507 (got.br_blockcount = xfs_bmbt_get_blockcount(ep)))
3508 *eofp = 0;
3509 else if (ep && lastx < nextents - 1 &&
3510 bno >= (got.br_startoff = xfs_bmbt_get_startoff(ep + 1)) &&
3511 bno < got.br_startoff +
3512 (got.br_blockcount = xfs_bmbt_get_blockcount(ep + 1))) {
3513 lastx++;
3514 ep++;
3515 *eofp = 0;
3516 } else if (nextents == 0)
3517 *eofp = 1;
3518 else if (bno == 0 &&
3519 (got.br_startoff = xfs_bmbt_get_startoff(base)) == 0) {
3520 ep = base;
3521 lastx = 0;
3522 got.br_blockcount = xfs_bmbt_get_blockcount(ep);
3523 *eofp = 0;
3524 } else {
3525 low = 0;
3526 high = nextents - 1;
3527 /* binary search the extents array */
3528 while (low <= high) {
3529 XFS_STATS_INC(xs_cmp_exlist);
3530 lastx = (low + high) >> 1;
3531 ep = base + lastx;
3532 got.br_startoff = xfs_bmbt_get_startoff(ep);
3533 got.br_blockcount = xfs_bmbt_get_blockcount(ep);
3534 if (bno < got.br_startoff)
3535 high = lastx - 1;
3536 else if (bno >= got.br_startoff + got.br_blockcount)
3537 low = lastx + 1;
3538 else {
3539 got.br_startblock = xfs_bmbt_get_startblock(ep);
3540 got.br_state = xfs_bmbt_get_state(ep);
3541 *eofp = 0;
3542 *lastxp = lastx;
3543 *gotp = got;
3544 return ep;
3545 }
3546 }
3547 if (bno >= got.br_startoff + got.br_blockcount) {
3548 lastx++;
3549 if (lastx == nextents) {
3550 *eofp = 1;
3551 got.br_startblock = xfs_bmbt_get_startblock(ep);
3552 got.br_state = xfs_bmbt_get_state(ep);
3553 *prevp = got;
3554 ep = NULL;
3555 } else {
3556 *eofp = 0;
3557 xfs_bmbt_get_all(ep, prevp);
3558 ep++;
3559 got.br_startoff = xfs_bmbt_get_startoff(ep);
3560 got.br_blockcount = xfs_bmbt_get_blockcount(ep);
3561 }
3562 } else {
3563 *eofp = 0;
3564 if (ep > base)
3565 xfs_bmbt_get_all(ep - 1, prevp);
3566 }
3567 }
3568 if (ep) {
3569 got.br_startblock = xfs_bmbt_get_startblock(ep);
3570 got.br_state = xfs_bmbt_get_state(ep);
3571 }
3572 *lastxp = lastx;
3573 *gotp = got;
3574 return ep;
3575}
3576
3577/* 3470/*
3578 * Search the extent records for the entry containing block bno. 3471 * Search the extent records for the entry containing block bno.
3579 * If bno lies in a hole, point to the next entry. If bno lies 3472 * If bno lies in a hole, point to the next entry. If bno lies
diff --git a/fs/xfs/xfs_bmap.h b/fs/xfs/xfs_bmap.h
index 011ccaa9a1c0..f83399c89ce3 100644
--- a/fs/xfs/xfs_bmap.h
+++ b/fs/xfs/xfs_bmap.h
@@ -362,14 +362,6 @@ xfs_bmbt_rec_t *
362xfs_bmap_search_multi_extents(struct xfs_ifork *, xfs_fileoff_t, int *, 362xfs_bmap_search_multi_extents(struct xfs_ifork *, xfs_fileoff_t, int *,
363 xfs_extnum_t *, xfs_bmbt_irec_t *, xfs_bmbt_irec_t *); 363 xfs_extnum_t *, xfs_bmbt_irec_t *, xfs_bmbt_irec_t *);
364 364
365/*
366 * Search an extent list for the extent which includes block
367 * bno.
368 */
369xfs_bmbt_rec_t *xfs_bmap_do_search_extents(xfs_bmbt_rec_t *,
370 xfs_extnum_t, xfs_extnum_t, xfs_fileoff_t, int *,
371 xfs_extnum_t *, xfs_bmbt_irec_t *, xfs_bmbt_irec_t *);
372
373#endif /* __KERNEL__ */ 365#endif /* __KERNEL__ */
374 366
375#endif /* __XFS_BMAP_H__ */ 367#endif /* __XFS_BMAP_H__ */
diff --git a/fs/xfs/xfs_buf_item.c b/fs/xfs/xfs_buf_item.c
index 07e2324152b1..5fed15682dda 100644
--- a/fs/xfs/xfs_buf_item.c
+++ b/fs/xfs/xfs_buf_item.c
@@ -98,12 +98,12 @@ xfs_buf_item_flush_log_debug(
98} 98}
99 99
100/* 100/*
101 * This function is called to verify that our caller's have logged 101 * This function is called to verify that our callers have logged
102 * all the bytes that they changed. 102 * all the bytes that they changed.
103 * 103 *
104 * It does this by comparing the original copy of the buffer stored in 104 * It does this by comparing the original copy of the buffer stored in
105 * the buf log item's bli_orig array to the current copy of the buffer 105 * the buf log item's bli_orig array to the current copy of the buffer
106 * and ensuring that all bytes which miscompare are set in the bli_logged 106 * and ensuring that all bytes which mismatch are set in the bli_logged
107 * array of the buf log item. 107 * array of the buf log item.
108 */ 108 */
109STATIC void 109STATIC void
diff --git a/fs/xfs/xfs_cap.h b/fs/xfs/xfs_cap.h
index 433ec537f9bd..d0035c6e9514 100644
--- a/fs/xfs/xfs_cap.h
+++ b/fs/xfs/xfs_cap.h
@@ -38,7 +38,7 @@ typedef struct xfs_cap_set {
38/* 38/*
39 * For Linux, we take the bitfields directly from capability.h 39 * For Linux, we take the bitfields directly from capability.h
40 * and no longer attempt to keep this attribute ondisk compatible 40 * and no longer attempt to keep this attribute ondisk compatible
41 * with IRIX. Since this attribute is only set on exectuables, 41 * with IRIX. Since this attribute is only set on executables,
42 * it just doesn't make much sense to try. We do use a different 42 * it just doesn't make much sense to try. We do use a different
43 * named attribute though, to avoid confusion. 43 * named attribute though, to avoid confusion.
44 */ 44 */
diff --git a/fs/xfs/xfs_da_btree.c b/fs/xfs/xfs_da_btree.c
index 4bae3a76c678..8988b9051175 100644
--- a/fs/xfs/xfs_da_btree.c
+++ b/fs/xfs/xfs_da_btree.c
@@ -840,7 +840,7 @@ xfs_da_node_toosmall(xfs_da_state_t *state, int *action)
840 /* 840 /*
841 * Check for the degenerate case of the block being empty. 841 * Check for the degenerate case of the block being empty.
842 * If the block is empty, we'll simply delete it, no need to 842 * If the block is empty, we'll simply delete it, no need to
843 * coalesce it with a sibling block. We choose (aribtrarily) 843 * coalesce it with a sibling block. We choose (arbitrarily)
844 * to merge with the forward block unless it is NULL. 844 * to merge with the forward block unless it is NULL.
845 */ 845 */
846 if (count == 0) { 846 if (count == 0) {
diff --git a/fs/xfs/xfs_dir2_block.c b/fs/xfs/xfs_dir2_block.c
index bd5cee6aa51a..972ded595476 100644
--- a/fs/xfs/xfs_dir2_block.c
+++ b/fs/xfs/xfs_dir2_block.c
@@ -533,7 +533,7 @@ xfs_dir2_block_getdents(
533 533
534 /* 534 /*
535 * Reached the end of the block. 535 * Reached the end of the block.
536 * Set the offset to a nonexistent block 1 and return. 536 * Set the offset to a non-existent block 1 and return.
537 */ 537 */
538 *eofp = 1; 538 *eofp = 1;
539 539
diff --git a/fs/xfs/xfs_dir2_leaf.c b/fs/xfs/xfs_dir2_leaf.c
index 08648b18265c..0f5e2f2ce6ec 100644
--- a/fs/xfs/xfs_dir2_leaf.c
+++ b/fs/xfs/xfs_dir2_leaf.c
@@ -515,7 +515,7 @@ xfs_dir2_leaf_addname(
515 ASSERT(be32_to_cpu(leaf->ents[highstale].address) == 515 ASSERT(be32_to_cpu(leaf->ents[highstale].address) ==
516 XFS_DIR2_NULL_DATAPTR); 516 XFS_DIR2_NULL_DATAPTR);
517 /* 517 /*
518 * Copy entries down to copver the stale entry 518 * Copy entries down to cover the stale entry
519 * and make room for the new entry. 519 * and make room for the new entry.
520 */ 520 */
521 if (highstale - index > 0) 521 if (highstale - index > 0)
diff --git a/fs/xfs/xfs_dir2_node.c b/fs/xfs/xfs_dir2_node.c
index af556f16a0c7..ac511ab9c52d 100644
--- a/fs/xfs/xfs_dir2_node.c
+++ b/fs/xfs/xfs_dir2_node.c
@@ -830,7 +830,7 @@ xfs_dir2_leafn_rebalance(
830 state->inleaf = 1; 830 state->inleaf = 1;
831 blk2->index = 0; 831 blk2->index = 0;
832 cmn_err(CE_ALERT, 832 cmn_err(CE_ALERT,
833 "xfs_dir2_leafn_rebalance: picked the wrong leaf? reverting orignal leaf: " 833 "xfs_dir2_leafn_rebalance: picked the wrong leaf? reverting original leaf: "
834 "blk1->index %d\n", 834 "blk1->index %d\n",
835 blk1->index); 835 blk1->index);
836 } 836 }
diff --git a/fs/xfs/xfs_dir_leaf.c b/fs/xfs/xfs_dir_leaf.c
index ee88751c3be6..6d711869262f 100644
--- a/fs/xfs/xfs_dir_leaf.c
+++ b/fs/xfs/xfs_dir_leaf.c
@@ -1341,7 +1341,7 @@ xfs_dir_leaf_toosmall(xfs_da_state_t *state, int *action)
1341 /* 1341 /*
1342 * Check for the degenerate case of the block being empty. 1342 * Check for the degenerate case of the block being empty.
1343 * If the block is empty, we'll simply delete it, no need to 1343 * If the block is empty, we'll simply delete it, no need to
1344 * coalesce it with a sibling block. We choose (aribtrarily) 1344 * coalesce it with a sibling block. We choose (arbitrarily)
1345 * to merge with the forward block unless it is NULL. 1345 * to merge with the forward block unless it is NULL.
1346 */ 1346 */
1347 if (count == 0) { 1347 if (count == 0) {
diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c
index 56caa88713ab..dfa3527b20a7 100644
--- a/fs/xfs/xfs_fsops.c
+++ b/fs/xfs/xfs_fsops.c
@@ -477,7 +477,7 @@ xfs_fs_counts(
477 * 477 *
478 * xfs_reserve_blocks is called to set m_resblks 478 * xfs_reserve_blocks is called to set m_resblks
479 * in the in-core mount table. The number of unused reserved blocks 479 * in the in-core mount table. The number of unused reserved blocks
480 * is kept in m_resbls_avail. 480 * is kept in m_resblks_avail.
481 * 481 *
482 * Reserve the requested number of blocks if available. Otherwise return 482 * Reserve the requested number of blocks if available. Otherwise return
483 * as many as possible to satisfy the request. The actual number 483 * as many as possible to satisfy the request. The actual number
diff --git a/fs/xfs/xfs_ialloc.c b/fs/xfs/xfs_ialloc.c
index 0024892841a3..4eeb856183b1 100644
--- a/fs/xfs/xfs_ialloc.c
+++ b/fs/xfs/xfs_ialloc.c
@@ -136,7 +136,7 @@ xfs_ialloc_ag_alloc(
136 int ninodes; /* num inodes per buf */ 136 int ninodes; /* num inodes per buf */
137 xfs_agino_t thisino; /* current inode number, for loop */ 137 xfs_agino_t thisino; /* current inode number, for loop */
138 int version; /* inode version number to use */ 138 int version; /* inode version number to use */
139 int isaligned; /* inode allocation at stripe unit */ 139 int isaligned = 0; /* inode allocation at stripe unit */
140 /* boundary */ 140 /* boundary */
141 141
142 args.tp = tp; 142 args.tp = tp;
@@ -152,47 +152,75 @@ xfs_ialloc_ag_alloc(
152 return XFS_ERROR(ENOSPC); 152 return XFS_ERROR(ENOSPC);
153 args.minlen = args.maxlen = XFS_IALLOC_BLOCKS(args.mp); 153 args.minlen = args.maxlen = XFS_IALLOC_BLOCKS(args.mp);
154 /* 154 /*
155 * Set the alignment for the allocation. 155 * First try to allocate inodes contiguous with the last-allocated
156 * If stripe alignment is turned on then align at stripe unit 156 * chunk of inodes. If the filesystem is striped, this will fill
157 * boundary. 157 * an entire stripe unit with inodes.
158 * If the cluster size is smaller than a filesystem block 158 */
159 * then we're doing I/O for inodes in filesystem block size pieces,
160 * so don't need alignment anyway.
161 */
162 isaligned = 0;
163 if (args.mp->m_sinoalign) {
164 ASSERT(!(args.mp->m_flags & XFS_MOUNT_NOALIGN));
165 args.alignment = args.mp->m_dalign;
166 isaligned = 1;
167 } else if (XFS_SB_VERSION_HASALIGN(&args.mp->m_sb) &&
168 args.mp->m_sb.sb_inoalignmt >=
169 XFS_B_TO_FSBT(args.mp, XFS_INODE_CLUSTER_SIZE(args.mp)))
170 args.alignment = args.mp->m_sb.sb_inoalignmt;
171 else
172 args.alignment = 1;
173 agi = XFS_BUF_TO_AGI(agbp); 159 agi = XFS_BUF_TO_AGI(agbp);
174 /* 160 newino = be32_to_cpu(agi->agi_newino);
175 * Need to figure out where to allocate the inode blocks. 161 if(likely(newino != NULLAGINO)) {
176 * Ideally they should be spaced out through the a.g. 162 args.agbno = XFS_AGINO_TO_AGBNO(args.mp, newino) +
177 * For now, just allocate blocks up front. 163 XFS_IALLOC_BLOCKS(args.mp);
178 */ 164 args.fsbno = XFS_AGB_TO_FSB(args.mp,
179 args.agbno = be32_to_cpu(agi->agi_root); 165 be32_to_cpu(agi->agi_seqno), args.agbno);
180 args.fsbno = XFS_AGB_TO_FSB(args.mp, be32_to_cpu(agi->agi_seqno), 166 args.type = XFS_ALLOCTYPE_THIS_BNO;
181 args.agbno); 167 args.mod = args.total = args.wasdel = args.isfl =
182 /* 168 args.userdata = args.minalignslop = 0;
183 * Allocate a fixed-size extent of inodes. 169 args.prod = 1;
184 */ 170 args.alignment = 1;
185 args.type = XFS_ALLOCTYPE_NEAR_BNO; 171 /*
186 args.mod = args.total = args.wasdel = args.isfl = args.userdata = 172 * Allow space for the inode btree to split.
187 args.minalignslop = 0; 173 */
188 args.prod = 1; 174 args.minleft = XFS_IN_MAXLEVELS(args.mp) - 1;
189 /* 175 if ((error = xfs_alloc_vextent(&args)))
190 * Allow space for the inode btree to split. 176 return error;
191 */ 177 } else
192 args.minleft = XFS_IN_MAXLEVELS(args.mp) - 1; 178 args.fsbno = NULLFSBLOCK;
193 if ((error = xfs_alloc_vextent(&args)))
194 return error;
195 179
180 if (unlikely(args.fsbno == NULLFSBLOCK)) {
181 /*
182 * Set the alignment for the allocation.
183 * If stripe alignment is turned on then align at stripe unit
184 * boundary.
185 * If the cluster size is smaller than a filesystem block
186 * then we're doing I/O for inodes in filesystem block size
187 * pieces, so don't need alignment anyway.
188 */
189 isaligned = 0;
190 if (args.mp->m_sinoalign) {
191 ASSERT(!(args.mp->m_flags & XFS_MOUNT_NOALIGN));
192 args.alignment = args.mp->m_dalign;
193 isaligned = 1;
194 } else if (XFS_SB_VERSION_HASALIGN(&args.mp->m_sb) &&
195 args.mp->m_sb.sb_inoalignmt >=
196 XFS_B_TO_FSBT(args.mp,
197 XFS_INODE_CLUSTER_SIZE(args.mp)))
198 args.alignment = args.mp->m_sb.sb_inoalignmt;
199 else
200 args.alignment = 1;
201 /*
202 * Need to figure out where to allocate the inode blocks.
203 * Ideally they should be spaced out through the a.g.
204 * For now, just allocate blocks up front.
205 */
206 args.agbno = be32_to_cpu(agi->agi_root);
207 args.fsbno = XFS_AGB_TO_FSB(args.mp,
208 be32_to_cpu(agi->agi_seqno), args.agbno);
209 /*
210 * Allocate a fixed-size extent of inodes.
211 */
212 args.type = XFS_ALLOCTYPE_NEAR_BNO;
213 args.mod = args.total = args.wasdel = args.isfl =
214 args.userdata = args.minalignslop = 0;
215 args.prod = 1;
216 /*
217 * Allow space for the inode btree to split.
218 */
219 args.minleft = XFS_IN_MAXLEVELS(args.mp) - 1;
220 if ((error = xfs_alloc_vextent(&args)))
221 return error;
222 }
223
196 /* 224 /*
197 * If stripe alignment is turned on, then try again with cluster 225 * If stripe alignment is turned on, then try again with cluster
198 * alignment. 226 * alignment.
@@ -1023,7 +1051,7 @@ xfs_difree(
1023 rec.ir_freecount++; 1051 rec.ir_freecount++;
1024 1052
1025 /* 1053 /*
1026 * When an inode cluster is free, it becomes elgible for removal 1054 * When an inode cluster is free, it becomes eligible for removal
1027 */ 1055 */
1028 if ((mp->m_flags & XFS_MOUNT_IDELETE) && 1056 if ((mp->m_flags & XFS_MOUNT_IDELETE) &&
1029 (rec.ir_freecount == XFS_IALLOC_INODES(mp))) { 1057 (rec.ir_freecount == XFS_IALLOC_INODES(mp))) {
diff --git a/fs/xfs/xfs_iget.c b/fs/xfs/xfs_iget.c
index 3ce35a6f700b..bb33113eef9f 100644
--- a/fs/xfs/xfs_iget.c
+++ b/fs/xfs/xfs_iget.c
@@ -509,7 +509,7 @@ retry:
509 } else { 509 } else {
510 /* 510 /*
511 * If the inode is not fully constructed due to 511 * If the inode is not fully constructed due to
512 * filehandle mistmatches wait for the inode to go 512 * filehandle mismatches wait for the inode to go
513 * away and try again. 513 * away and try again.
514 * 514 *
515 * iget_locked will call __wait_on_freeing_inode 515 * iget_locked will call __wait_on_freeing_inode
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index 88a517fad07b..48146bdc6bdd 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -160,7 +160,7 @@ xfs_inotobp(
160 xfs_dinode_t *dip; 160 xfs_dinode_t *dip;
161 161
162 /* 162 /*
163 * Call the space managment code to find the location of the 163 * Call the space management code to find the location of the
164 * inode on disk. 164 * inode on disk.
165 */ 165 */
166 imap.im_blkno = 0; 166 imap.im_blkno = 0;
@@ -837,7 +837,7 @@ xfs_dic2xflags(
837 837
838/* 838/*
839 * Given a mount structure and an inode number, return a pointer 839 * Given a mount structure and an inode number, return a pointer
840 * to a newly allocated in-core inode coresponding to the given 840 * to a newly allocated in-core inode corresponding to the given
841 * inode number. 841 * inode number.
842 * 842 *
843 * Initialize the inode's attributes and extent pointers if it 843 * Initialize the inode's attributes and extent pointers if it
@@ -2723,7 +2723,7 @@ xfs_ipin(
2723/* 2723/*
2724 * Decrement the pin count of the given inode, and wake up 2724 * Decrement the pin count of the given inode, and wake up
2725 * anyone in xfs_iwait_unpin() if the count goes to 0. The 2725 * anyone in xfs_iwait_unpin() if the count goes to 0. The
2726 * inode must have been previoulsy pinned with a call to xfs_ipin(). 2726 * inode must have been previously pinned with a call to xfs_ipin().
2727 */ 2727 */
2728void 2728void
2729xfs_iunpin( 2729xfs_iunpin(
@@ -3690,7 +3690,7 @@ void
3690xfs_iext_add( 3690xfs_iext_add(
3691 xfs_ifork_t *ifp, /* inode fork pointer */ 3691 xfs_ifork_t *ifp, /* inode fork pointer */
3692 xfs_extnum_t idx, /* index to begin adding exts */ 3692 xfs_extnum_t idx, /* index to begin adding exts */
3693 int ext_diff) /* nubmer of extents to add */ 3693 int ext_diff) /* number of extents to add */
3694{ 3694{
3695 int byte_diff; /* new bytes being added */ 3695 int byte_diff; /* new bytes being added */
3696 int new_size; /* size of extents after adding */ 3696 int new_size; /* size of extents after adding */
@@ -4038,7 +4038,7 @@ xfs_iext_remove_indirect(
4038 xfs_extnum_t ext_diff; /* extents to remove in current list */ 4038 xfs_extnum_t ext_diff; /* extents to remove in current list */
4039 xfs_extnum_t nex1; /* number of extents before idx */ 4039 xfs_extnum_t nex1; /* number of extents before idx */
4040 xfs_extnum_t nex2; /* extents after idx + count */ 4040 xfs_extnum_t nex2; /* extents after idx + count */
4041 int nlists; /* entries in indirecton array */ 4041 int nlists; /* entries in indirection array */
4042 int page_idx = idx; /* index in target extent list */ 4042 int page_idx = idx; /* index in target extent list */
4043 4043
4044 ASSERT(ifp->if_flags & XFS_IFEXTIREC); 4044 ASSERT(ifp->if_flags & XFS_IFEXTIREC);
@@ -4291,9 +4291,9 @@ xfs_iext_bno_to_ext(
4291 xfs_filblks_t blockcount = 0; /* number of blocks in extent */ 4291 xfs_filblks_t blockcount = 0; /* number of blocks in extent */
4292 xfs_bmbt_rec_t *ep = NULL; /* pointer to target extent */ 4292 xfs_bmbt_rec_t *ep = NULL; /* pointer to target extent */
4293 xfs_ext_irec_t *erp = NULL; /* indirection array pointer */ 4293 xfs_ext_irec_t *erp = NULL; /* indirection array pointer */
4294 int high; /* upper boundry in search */ 4294 int high; /* upper boundary in search */
4295 xfs_extnum_t idx = 0; /* index of target extent */ 4295 xfs_extnum_t idx = 0; /* index of target extent */
4296 int low; /* lower boundry in search */ 4296 int low; /* lower boundary in search */
4297 xfs_extnum_t nextents; /* number of file extents */ 4297 xfs_extnum_t nextents; /* number of file extents */
4298 xfs_fileoff_t startoff = 0; /* start offset of extent */ 4298 xfs_fileoff_t startoff = 0; /* start offset of extent */
4299 4299
diff --git a/fs/xfs/xfs_inode_item.c b/fs/xfs/xfs_inode_item.c
index 36aa1fcb90a5..7497a481b2f5 100644
--- a/fs/xfs/xfs_inode_item.c
+++ b/fs/xfs/xfs_inode_item.c
@@ -580,7 +580,7 @@ xfs_inode_item_unpin_remove(
580 * been or is in the process of being flushed, then (ideally) we'd like to 580 * been or is in the process of being flushed, then (ideally) we'd like to
581 * see if the inode's buffer is still incore, and if so give it a nudge. 581 * see if the inode's buffer is still incore, and if so give it a nudge.
582 * We delay doing so until the pushbuf routine, though, to avoid holding 582 * We delay doing so until the pushbuf routine, though, to avoid holding
583 * the AIL lock across a call to the blackhole which is the buffercache. 583 * the AIL lock across a call to the blackhole which is the buffer cache.
584 * Also we don't want to sleep in any device strategy routines, which can happen 584 * Also we don't want to sleep in any device strategy routines, which can happen
585 * if we do the subsequent bawrite in here. 585 * if we do the subsequent bawrite in here.
586 */ 586 */
diff --git a/fs/xfs/xfs_itable.c b/fs/xfs/xfs_itable.c
index 32247b6bfee7..94068d014f27 100644
--- a/fs/xfs/xfs_itable.c
+++ b/fs/xfs/xfs_itable.c
@@ -272,7 +272,7 @@ xfs_bulkstat(
272 size_t statstruct_size, /* sizeof struct filling */ 272 size_t statstruct_size, /* sizeof struct filling */
273 char __user *ubuffer, /* buffer with inode stats */ 273 char __user *ubuffer, /* buffer with inode stats */
274 int flags, /* defined in xfs_itable.h */ 274 int flags, /* defined in xfs_itable.h */
275 int *done) /* 1 if there're more stats to get */ 275 int *done) /* 1 if there are more stats to get */
276{ 276{
277 xfs_agblock_t agbno=0;/* allocation group block number */ 277 xfs_agblock_t agbno=0;/* allocation group block number */
278 xfs_buf_t *agbp; /* agi header buffer */ 278 xfs_buf_t *agbp; /* agi header buffer */
@@ -676,7 +676,7 @@ xfs_bulkstat_single(
676 xfs_mount_t *mp, /* mount point for filesystem */ 676 xfs_mount_t *mp, /* mount point for filesystem */
677 xfs_ino_t *lastinop, /* inode to return */ 677 xfs_ino_t *lastinop, /* inode to return */
678 char __user *buffer, /* buffer with inode stats */ 678 char __user *buffer, /* buffer with inode stats */
679 int *done) /* 1 if there're more stats to get */ 679 int *done) /* 1 if there are more stats to get */
680{ 680{
681 int count; /* count value for bulkstat call */ 681 int count; /* count value for bulkstat call */
682 int error; /* return value */ 682 int error; /* return value */
diff --git a/fs/xfs/xfs_itable.h b/fs/xfs/xfs_itable.h
index 047d834ed210..11eb4e1b18c4 100644
--- a/fs/xfs/xfs_itable.h
+++ b/fs/xfs/xfs_itable.h
@@ -60,7 +60,7 @@ xfs_bulkstat(
60 size_t statstruct_size,/* sizeof struct that we're filling */ 60 size_t statstruct_size,/* sizeof struct that we're filling */
61 char __user *ubuffer,/* buffer with inode stats */ 61 char __user *ubuffer,/* buffer with inode stats */
62 int flags, /* flag to control access method */ 62 int flags, /* flag to control access method */
63 int *done); /* 1 if there're more stats to get */ 63 int *done); /* 1 if there are more stats to get */
64 64
65int 65int
66xfs_bulkstat_single( 66xfs_bulkstat_single(
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index 9176995160ed..32e841d2f26d 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -59,7 +59,7 @@ STATIC xlog_t * xlog_alloc_log(xfs_mount_t *mp,
59 int num_bblks); 59 int num_bblks);
60STATIC int xlog_space_left(xlog_t *log, int cycle, int bytes); 60STATIC int xlog_space_left(xlog_t *log, int cycle, int bytes);
61STATIC int xlog_sync(xlog_t *log, xlog_in_core_t *iclog); 61STATIC int xlog_sync(xlog_t *log, xlog_in_core_t *iclog);
62STATIC void xlog_unalloc_log(xlog_t *log); 62STATIC void xlog_dealloc_log(xlog_t *log);
63STATIC int xlog_write(xfs_mount_t *mp, xfs_log_iovec_t region[], 63STATIC int xlog_write(xfs_mount_t *mp, xfs_log_iovec_t region[],
64 int nentries, xfs_log_ticket_t tic, 64 int nentries, xfs_log_ticket_t tic,
65 xfs_lsn_t *start_lsn, 65 xfs_lsn_t *start_lsn,
@@ -304,7 +304,7 @@ xfs_log_done(xfs_mount_t *mp,
304 if ((ticket->t_flags & XLOG_TIC_PERM_RESERV) == 0 || 304 if ((ticket->t_flags & XLOG_TIC_PERM_RESERV) == 0 ||
305 (flags & XFS_LOG_REL_PERM_RESERV)) { 305 (flags & XFS_LOG_REL_PERM_RESERV)) {
306 /* 306 /*
307 * Release ticket if not permanent reservation or a specifc 307 * Release ticket if not permanent reservation or a specific
308 * request has been made to release a permanent reservation. 308 * request has been made to release a permanent reservation.
309 */ 309 */
310 xlog_trace_loggrant(log, ticket, "xfs_log_done: (non-permanent)"); 310 xlog_trace_loggrant(log, ticket, "xfs_log_done: (non-permanent)");
@@ -511,7 +511,7 @@ xfs_log_mount(xfs_mount_t *mp,
511 vfsp->vfs_flag |= VFS_RDONLY; 511 vfsp->vfs_flag |= VFS_RDONLY;
512 if (error) { 512 if (error) {
513 cmn_err(CE_WARN, "XFS: log mount/recovery failed: error %d", error); 513 cmn_err(CE_WARN, "XFS: log mount/recovery failed: error %d", error);
514 xlog_unalloc_log(mp->m_log); 514 xlog_dealloc_log(mp->m_log);
515 return error; 515 return error;
516 } 516 }
517 } 517 }
@@ -667,7 +667,7 @@ xfs_log_unmount_write(xfs_mount_t *mp)
667 * 667 *
668 * Go through the motions of sync'ing and releasing 668 * Go through the motions of sync'ing and releasing
669 * the iclog, even though no I/O will actually happen, 669 * the iclog, even though no I/O will actually happen,
670 * we need to wait for other log I/O's that may already 670 * we need to wait for other log I/Os that may already
671 * be in progress. Do this as a separate section of 671 * be in progress. Do this as a separate section of
672 * code so we'll know if we ever get stuck here that 672 * code so we'll know if we ever get stuck here that
673 * we're in this odd situation of trying to unmount 673 * we're in this odd situation of trying to unmount
@@ -704,7 +704,7 @@ xfs_log_unmount_write(xfs_mount_t *mp)
704void 704void
705xfs_log_unmount_dealloc(xfs_mount_t *mp) 705xfs_log_unmount_dealloc(xfs_mount_t *mp)
706{ 706{
707 xlog_unalloc_log(mp->m_log); 707 xlog_dealloc_log(mp->m_log);
708} 708}
709 709
710/* 710/*
@@ -1492,7 +1492,7 @@ xlog_sync(xlog_t *log,
1492 ASSERT(XFS_BUF_ADDR(bp) <= log->l_logBBsize-1); 1492 ASSERT(XFS_BUF_ADDR(bp) <= log->l_logBBsize-1);
1493 ASSERT(XFS_BUF_ADDR(bp) + BTOBB(count) <= log->l_logBBsize); 1493 ASSERT(XFS_BUF_ADDR(bp) + BTOBB(count) <= log->l_logBBsize);
1494 1494
1495 /* account for internal log which does't start at block #0 */ 1495 /* account for internal log which doesn't start at block #0 */
1496 XFS_BUF_SET_ADDR(bp, XFS_BUF_ADDR(bp) + log->l_logBBstart); 1496 XFS_BUF_SET_ADDR(bp, XFS_BUF_ADDR(bp) + log->l_logBBstart);
1497 XFS_BUF_WRITE(bp); 1497 XFS_BUF_WRITE(bp);
1498 if ((error = XFS_bwrite(bp))) { 1498 if ((error = XFS_bwrite(bp))) {
@@ -1506,10 +1506,10 @@ xlog_sync(xlog_t *log,
1506 1506
1507 1507
1508/* 1508/*
1509 * Unallocate a log structure 1509 * Deallocate a log structure
1510 */ 1510 */
1511void 1511void
1512xlog_unalloc_log(xlog_t *log) 1512xlog_dealloc_log(xlog_t *log)
1513{ 1513{
1514 xlog_in_core_t *iclog, *next_iclog; 1514 xlog_in_core_t *iclog, *next_iclog;
1515 xlog_ticket_t *tic, *next_tic; 1515 xlog_ticket_t *tic, *next_tic;
@@ -1539,7 +1539,7 @@ xlog_unalloc_log(xlog_t *log)
1539 if ((log->l_ticket_cnt != log->l_ticket_tcnt) && 1539 if ((log->l_ticket_cnt != log->l_ticket_tcnt) &&
1540 !XLOG_FORCED_SHUTDOWN(log)) { 1540 !XLOG_FORCED_SHUTDOWN(log)) {
1541 xfs_fs_cmn_err(CE_WARN, log->l_mp, 1541 xfs_fs_cmn_err(CE_WARN, log->l_mp,
1542 "xlog_unalloc_log: (cnt: %d, total: %d)", 1542 "xlog_dealloc_log: (cnt: %d, total: %d)",
1543 log->l_ticket_cnt, log->l_ticket_tcnt); 1543 log->l_ticket_cnt, log->l_ticket_tcnt);
1544 /* ASSERT(log->l_ticket_cnt == log->l_ticket_tcnt); */ 1544 /* ASSERT(log->l_ticket_cnt == log->l_ticket_tcnt); */
1545 1545
@@ -1562,7 +1562,7 @@ xlog_unalloc_log(xlog_t *log)
1562#endif 1562#endif
1563 log->l_mp->m_log = NULL; 1563 log->l_mp->m_log = NULL;
1564 kmem_free(log, sizeof(xlog_t)); 1564 kmem_free(log, sizeof(xlog_t));
1565} /* xlog_unalloc_log */ 1565} /* xlog_dealloc_log */
1566 1566
1567/* 1567/*
1568 * Update counters atomically now that memcpy is done. 1568 * Update counters atomically now that memcpy is done.
@@ -2829,7 +2829,7 @@ xlog_state_release_iclog(xlog_t *log,
2829 2829
2830 /* 2830 /*
2831 * We let the log lock go, so it's possible that we hit a log I/O 2831 * We let the log lock go, so it's possible that we hit a log I/O
2832 * error or someother SHUTDOWN condition that marks the iclog 2832 * error or some other SHUTDOWN condition that marks the iclog
2833 * as XLOG_STATE_IOERROR before the bwrite. However, we know that 2833 * as XLOG_STATE_IOERROR before the bwrite. However, we know that
2834 * this iclog has consistent data, so we ignore IOERROR 2834 * this iclog has consistent data, so we ignore IOERROR
2835 * flags after this point. 2835 * flags after this point.
diff --git a/fs/xfs/xfs_log.h b/fs/xfs/xfs_log.h
index 4b2ac88dbb83..eacb3d4987f2 100644
--- a/fs/xfs/xfs_log.h
+++ b/fs/xfs/xfs_log.h
@@ -27,7 +27,7 @@
27 27
28#ifdef __KERNEL__ 28#ifdef __KERNEL__
29/* 29/*
30 * By comparing each compnent, we don't have to worry about extra 30 * By comparing each component, we don't have to worry about extra
31 * endian issues in treating two 32 bit numbers as one 64 bit number 31 * endian issues in treating two 32 bit numbers as one 64 bit number
32 */ 32 */
33static inline xfs_lsn_t _lsn_cmp(xfs_lsn_t lsn1, xfs_lsn_t lsn2) 33static inline xfs_lsn_t _lsn_cmp(xfs_lsn_t lsn1, xfs_lsn_t lsn2)
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
index add13f507ed2..1f0016b0b4ec 100644
--- a/fs/xfs/xfs_log_recover.c
+++ b/fs/xfs/xfs_log_recover.c
@@ -583,7 +583,7 @@ xlog_find_head(
583 * x | x ... | x - 1 | x 583 * x | x ... | x - 1 | x
584 * Another case that fits this picture would be 584 * Another case that fits this picture would be
585 * x | x + 1 | x ... | x 585 * x | x + 1 | x ... | x
586 * In this case the head really is somwhere at the end of the 586 * In this case the head really is somewhere at the end of the
587 * log, as one of the latest writes at the beginning was 587 * log, as one of the latest writes at the beginning was
588 * incomplete. 588 * incomplete.
589 * One more case is 589 * One more case is
@@ -2799,7 +2799,7 @@ xlog_recover_do_trans(
2799 * we don't need to worry about the block number being 2799 * we don't need to worry about the block number being
2800 * truncated in > 1 TB buffers because in user-land, 2800 * truncated in > 1 TB buffers because in user-land,
2801 * we're now n32 or 64-bit so xfs_daddr_t is 64-bits so 2801 * we're now n32 or 64-bit so xfs_daddr_t is 64-bits so
2802 * the blkno's will get through the user-mode buffer 2802 * the blknos will get through the user-mode buffer
2803 * cache properly. The only bad case is o32 kernels 2803 * cache properly. The only bad case is o32 kernels
2804 * where xfs_daddr_t is 32-bits but mount will warn us 2804 * where xfs_daddr_t is 32-bits but mount will warn us
2805 * off a > 1 TB filesystem before we get here. 2805 * off a > 1 TB filesystem before we get here.
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
index 20e8abc16d18..72e7e78bfff8 100644
--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -393,7 +393,7 @@ xfs_initialize_perag(
393 break; 393 break;
394 } 394 }
395 395
396 /* This ag is prefered for inodes */ 396 /* This ag is preferred for inodes */
397 pag = &mp->m_perag[index]; 397 pag = &mp->m_perag[index];
398 pag->pagi_inodeok = 1; 398 pag->pagi_inodeok = 1;
399 if (index < max_metadata) 399 if (index < max_metadata)
@@ -1728,7 +1728,7 @@ xfs_mount_log_sbunit(
1728 * We cannot use the hotcpu_register() function because it does 1728 * We cannot use the hotcpu_register() function because it does
1729 * not allow notifier instances. We need a notifier per filesystem 1729 * not allow notifier instances. We need a notifier per filesystem
1730 * as we need to be able to identify the filesystem to balance 1730 * as we need to be able to identify the filesystem to balance
1731 * the counters out. This is acheived by having a notifier block 1731 * the counters out. This is achieved by having a notifier block
1732 * embedded in the xfs_mount_t and doing pointer magic to get the 1732 * embedded in the xfs_mount_t and doing pointer magic to get the
1733 * mount pointer from the notifier block address. 1733 * mount pointer from the notifier block address.
1734 */ 1734 */
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h
index ebd73960e9db..66cbee79864e 100644
--- a/fs/xfs/xfs_mount.h
+++ b/fs/xfs/xfs_mount.h
@@ -379,7 +379,7 @@ typedef struct xfs_mount {
379#endif 379#endif
380 int m_dalign; /* stripe unit */ 380 int m_dalign; /* stripe unit */
381 int m_swidth; /* stripe width */ 381 int m_swidth; /* stripe width */
382 int m_sinoalign; /* stripe unit inode alignmnt */ 382 int m_sinoalign; /* stripe unit inode alignment */
383 int m_attr_magicpct;/* 37% of the blocksize */ 383 int m_attr_magicpct;/* 37% of the blocksize */
384 int m_dir_magicpct; /* 37% of the dir blocksize */ 384 int m_dir_magicpct; /* 37% of the dir blocksize */
385 __uint8_t m_mk_sharedro; /* mark shared ro on unmount */ 385 __uint8_t m_mk_sharedro; /* mark shared ro on unmount */
diff --git a/fs/xfs/xfs_quota.h b/fs/xfs/xfs_quota.h
index 82a08baf437b..4f6a034de7f7 100644
--- a/fs/xfs/xfs_quota.h
+++ b/fs/xfs/xfs_quota.h
@@ -31,7 +31,7 @@
31typedef __uint32_t xfs_dqid_t; 31typedef __uint32_t xfs_dqid_t;
32 32
33/* 33/*
34 * Eventhough users may not have quota limits occupying all 64-bits, 34 * Even though users may not have quota limits occupying all 64-bits,
35 * they may need 64-bit accounting. Hence, 64-bit quota-counters, 35 * they may need 64-bit accounting. Hence, 64-bit quota-counters,
36 * and quota-limits. This is a waste in the common case, but hey ... 36 * and quota-limits. This is a waste in the common case, but hey ...
37 */ 37 */
@@ -246,7 +246,7 @@ typedef struct xfs_qoff_logformat {
246#ifdef __KERNEL__ 246#ifdef __KERNEL__
247/* 247/*
248 * This check is done typically without holding the inode lock; 248 * This check is done typically without holding the inode lock;
249 * that may seem racey, but it is harmless in the context that it is used. 249 * that may seem racy, but it is harmless in the context that it is used.
250 * The inode cannot go inactive as long a reference is kept, and 250 * The inode cannot go inactive as long a reference is kept, and
251 * therefore if dquot(s) were attached, they'll stay consistent. 251 * therefore if dquot(s) were attached, they'll stay consistent.
252 * If, for example, the ownership of the inode changes while 252 * If, for example, the ownership of the inode changes while
diff --git a/fs/xfs/xfs_trans.c b/fs/xfs/xfs_trans.c
index 2918956553a5..8d056cef5d1f 100644
--- a/fs/xfs/xfs_trans.c
+++ b/fs/xfs/xfs_trans.c
@@ -490,7 +490,7 @@ xfs_trans_mod_sb(
490 case XFS_TRANS_SB_RES_FREXTENTS: 490 case XFS_TRANS_SB_RES_FREXTENTS:
491 /* 491 /*
492 * The allocation has already been applied to the 492 * The allocation has already been applied to the
493 * in-core superblocks's counter. This should only 493 * in-core superblock's counter. This should only
494 * be applied to the on-disk superblock. 494 * be applied to the on-disk superblock.
495 */ 495 */
496 ASSERT(delta < 0); 496 ASSERT(delta < 0);
@@ -611,7 +611,7 @@ xfs_trans_apply_sb_deltas(
611 611
612 if (whole) 612 if (whole)
613 /* 613 /*
614 * Log the whole thing, the fields are discontiguous. 614 * Log the whole thing, the fields are noncontiguous.
615 */ 615 */
616 xfs_trans_log_buf(tp, bp, 0, sizeof(xfs_sb_t) - 1); 616 xfs_trans_log_buf(tp, bp, 0, sizeof(xfs_sb_t) - 1);
617 else 617 else
@@ -669,7 +669,7 @@ xfs_trans_unreserve_and_mod_sb(
669 /* 669 /*
670 * Apply any superblock modifications to the in-core version. 670 * Apply any superblock modifications to the in-core version.
671 * The t_res_fdblocks_delta and t_res_frextents_delta fields are 671 * The t_res_fdblocks_delta and t_res_frextents_delta fields are
672 * explicity NOT applied to the in-core superblock. 672 * explicitly NOT applied to the in-core superblock.
673 * The idea is that that has already been done. 673 * The idea is that that has already been done.
674 */ 674 */
675 if (tp->t_flags & XFS_TRANS_SB_DIRTY) { 675 if (tp->t_flags & XFS_TRANS_SB_DIRTY) {
diff --git a/fs/xfs/xfs_trans.h b/fs/xfs/xfs_trans.h
index e48befa4e337..100d9a4b38ee 100644
--- a/fs/xfs/xfs_trans.h
+++ b/fs/xfs/xfs_trans.h
@@ -354,7 +354,7 @@ typedef struct xfs_trans {
354 xfs_lsn_t t_commit_lsn; /* log seq num of end of 354 xfs_lsn_t t_commit_lsn; /* log seq num of end of
355 * transaction. */ 355 * transaction. */
356 struct xfs_mount *t_mountp; /* ptr to fs mount struct */ 356 struct xfs_mount *t_mountp; /* ptr to fs mount struct */
357 struct xfs_dquot_acct *t_dqinfo; /* accting info for dquots */ 357 struct xfs_dquot_acct *t_dqinfo; /* acctg info for dquots */
358 xfs_trans_callback_t t_callback; /* transaction callback */ 358 xfs_trans_callback_t t_callback; /* transaction callback */
359 void *t_callarg; /* callback arg */ 359 void *t_callarg; /* callback arg */
360 unsigned int t_flags; /* misc flags */ 360 unsigned int t_flags; /* misc flags */
diff --git a/fs/xfs/xfs_trans_inode.c b/fs/xfs/xfs_trans_inode.c
index e341409172d2..7c5894d59f81 100644
--- a/fs/xfs/xfs_trans_inode.c
+++ b/fs/xfs/xfs_trans_inode.c
@@ -272,7 +272,7 @@ xfs_trans_log_inode(
272 * This is to coordinate with the xfs_iflush() and xfs_iflush_done() 272 * This is to coordinate with the xfs_iflush() and xfs_iflush_done()
273 * routines in the eventual clearing of the ilf_fields bits. 273 * routines in the eventual clearing of the ilf_fields bits.
274 * See the big comment in xfs_iflush() for an explanation of 274 * See the big comment in xfs_iflush() for an explanation of
275 * this coorination mechanism. 275 * this coordination mechanism.
276 */ 276 */
277 flags |= ip->i_itemp->ili_last_fields; 277 flags |= ip->i_itemp->ili_last_fields;
278 ip->i_itemp->ili_format.ilf_fields |= flags; 278 ip->i_itemp->ili_format.ilf_fields |= flags;
diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c
index d4ec4dfaf19c..504d2a80747a 100644
--- a/fs/xfs/xfs_vfsops.c
+++ b/fs/xfs/xfs_vfsops.c
@@ -880,10 +880,10 @@ xfs_statvfs(
880 * determine if they should be flushed sync, async, or 880 * determine if they should be flushed sync, async, or
881 * delwri. 881 * delwri.
882 * SYNC_CLOSE - This flag is passed when the system is being 882 * SYNC_CLOSE - This flag is passed when the system is being
883 * unmounted. We should sync and invalidate everthing. 883 * unmounted. We should sync and invalidate everything.
884 * SYNC_FSDATA - This indicates that the caller would like to make 884 * SYNC_FSDATA - This indicates that the caller would like to make
885 * sure the superblock is safe on disk. We can ensure 885 * sure the superblock is safe on disk. We can ensure
886 * this by simply makeing sure the log gets flushed 886 * this by simply making sure the log gets flushed
887 * if SYNC_BDFLUSH is set, and by actually writing it 887 * if SYNC_BDFLUSH is set, and by actually writing it
888 * out otherwise. 888 * out otherwise.
889 * 889 *
@@ -908,7 +908,7 @@ xfs_sync(
908 * 908 *
909 * This routine supports all of the flags defined for the generic VFS_SYNC 909 * This routine supports all of the flags defined for the generic VFS_SYNC
910 * interface as explained above under xfs_sync. In the interests of not 910 * interface as explained above under xfs_sync. In the interests of not
911 * changing interfaces within the 6.5 family, additional internallly- 911 * changing interfaces within the 6.5 family, additional internally-
912 * required functions are specified within a separate xflags parameter, 912 * required functions are specified within a separate xflags parameter,
913 * only available by calling this routine. 913 * only available by calling this routine.
914 * 914 *
@@ -1090,7 +1090,7 @@ xfs_sync_inodes(
1090 * If this is just vfs_sync() or pflushd() calling 1090 * If this is just vfs_sync() or pflushd() calling
1091 * then we can skip inodes for which it looks like 1091 * then we can skip inodes for which it looks like
1092 * there is nothing to do. Since we don't have the 1092 * there is nothing to do. Since we don't have the
1093 * inode locked this is racey, but these are periodic 1093 * inode locked this is racy, but these are periodic
1094 * calls so it doesn't matter. For the others we want 1094 * calls so it doesn't matter. For the others we want
1095 * to know for sure, so we at least try to lock them. 1095 * to know for sure, so we at least try to lock them.
1096 */ 1096 */
@@ -1429,7 +1429,7 @@ xfs_sync_inodes(
1429 * 1429 *
1430 * This routine supports all of the flags defined for the generic VFS_SYNC 1430 * This routine supports all of the flags defined for the generic VFS_SYNC
1431 * interface as explained above under xfs_sync. In the interests of not 1431 * interface as explained above under xfs_sync. In the interests of not
1432 * changing interfaces within the 6.5 family, additional internallly- 1432 * changing interfaces within the 6.5 family, additional internally-
1433 * required functions are specified within a separate xflags parameter, 1433 * required functions are specified within a separate xflags parameter,
1434 * only available by calling this routine. 1434 * only available by calling this routine.
1435 * 1435 *
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
index 0f0a64e81db9..de49601919c1 100644
--- a/fs/xfs/xfs_vnodeops.c
+++ b/fs/xfs/xfs_vnodeops.c
@@ -848,7 +848,7 @@ xfs_setattr(
848 * If this is a synchronous mount, make sure that the 848 * If this is a synchronous mount, make sure that the
849 * transaction goes to disk before returning to the user. 849 * transaction goes to disk before returning to the user.
850 * This is slightly sub-optimal in that truncates require 850 * This is slightly sub-optimal in that truncates require
851 * two sync transactions instead of one for wsync filesytems. 851 * two sync transactions instead of one for wsync filesystems.
852 * One for the truncate and one for the timestamps since we 852 * One for the truncate and one for the timestamps since we
853 * don't want to change the timestamps unless we're sure the 853 * don't want to change the timestamps unless we're sure the
854 * truncate worked. Truncates are less than 1% of the laddis 854 * truncate worked. Truncates are less than 1% of the laddis
@@ -1170,7 +1170,7 @@ xfs_fsync(
1170 1170
1171 /* 1171 /*
1172 * If this inode is on the RT dev we need to flush that 1172 * If this inode is on the RT dev we need to flush that
1173 * cache aswell. 1173 * cache as well.
1174 */ 1174 */
1175 if (ip->i_d.di_flags & XFS_DIFLAG_REALTIME) 1175 if (ip->i_d.di_flags & XFS_DIFLAG_REALTIME)
1176 xfs_blkdev_issue_flush(ip->i_mount->m_rtdev_targp); 1176 xfs_blkdev_issue_flush(ip->i_mount->m_rtdev_targp);
@@ -1380,7 +1380,7 @@ xfs_inactive_symlink_rmt(
1380 */ 1380 */
1381 ntp = xfs_trans_dup(tp); 1381 ntp = xfs_trans_dup(tp);
1382 /* 1382 /*
1383 * Commit the transaction containing extent freeing and EFD's. 1383 * Commit the transaction containing extent freeing and EFDs.
1384 * If we get an error on the commit here or on the reserve below, 1384 * If we get an error on the commit here or on the reserve below,
1385 * we need to unlock the inode since the new transaction doesn't 1385 * we need to unlock the inode since the new transaction doesn't
1386 * have the inode attached. 1386 * have the inode attached.
@@ -2023,7 +2023,7 @@ xfs_create(
2023 XFS_QM_DQRELE(mp, gdqp); 2023 XFS_QM_DQRELE(mp, gdqp);
2024 2024
2025 /* 2025 /*
2026 * Propogate the fact that the vnode changed after the 2026 * Propagate the fact that the vnode changed after the
2027 * xfs_inode locks have been released. 2027 * xfs_inode locks have been released.
2028 */ 2028 */
2029 VOP_VNODE_CHANGE(vp, VCHANGE_FLAGS_TRUNCATED, 3); 2029 VOP_VNODE_CHANGE(vp, VCHANGE_FLAGS_TRUNCATED, 3);
@@ -2370,7 +2370,7 @@ xfs_remove(
2370 * for a log reservation. Since we'll have to wait for the 2370 * for a log reservation. Since we'll have to wait for the
2371 * inactive code to complete before returning from xfs_iget, 2371 * inactive code to complete before returning from xfs_iget,
2372 * we need to make sure that we don't have log space reserved 2372 * we need to make sure that we don't have log space reserved
2373 * when we call xfs_iget. Instead we get an unlocked referece 2373 * when we call xfs_iget. Instead we get an unlocked reference
2374 * to the inode before getting our log reservation. 2374 * to the inode before getting our log reservation.
2375 */ 2375 */
2376 error = xfs_get_dir_entry(dentry, &ip); 2376 error = xfs_get_dir_entry(dentry, &ip);
@@ -3020,7 +3020,7 @@ xfs_rmdir(
3020 * for a log reservation. Since we'll have to wait for the 3020 * for a log reservation. Since we'll have to wait for the
3021 * inactive code to complete before returning from xfs_iget, 3021 * inactive code to complete before returning from xfs_iget,
3022 * we need to make sure that we don't have log space reserved 3022 * we need to make sure that we don't have log space reserved
3023 * when we call xfs_iget. Instead we get an unlocked referece 3023 * when we call xfs_iget. Instead we get an unlocked reference
3024 * to the inode before getting our log reservation. 3024 * to the inode before getting our log reservation.
3025 */ 3025 */
3026 error = xfs_get_dir_entry(dentry, &cdp); 3026 error = xfs_get_dir_entry(dentry, &cdp);