aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_fsops.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-17 12:04:11 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-17 12:04:11 -0400
commit347c53dca73fca317d57781f510f5ff4f6c0d0d7 (patch)
treecdc405ac049751da4d76085ce58750b6b2a22326 /fs/xfs/xfs_fsops.c
parent5c8e191e8437616a498a8e1cc0af3dd0d32bbff2 (diff)
parent7f015072348a14f16d548be557ee58c5c55df0aa (diff)
Merge branch 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6
* 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6: (59 commits) [XFS] eagerly remove vmap mappings to avoid upsetting Xen [XFS] simplify validata_fields [XFS] no longer using io_vnode, as was remaining from 23 cherrypick [XFS] Remove STATIC which was missing from prior manual merge [XFS] Put back the QUEUE_ORDERED_NONE test in the barrier check. [XFS] Turn off XBF_ASYNC flag before re-reading superblock. [XFS] avoid race in sync_inodes() that can fail to write out all dirty data [XFS] This fix prevents bulkstat from spinning in an infinite loop. [XFS] simplify xfs_create/mknod/symlink prototype [XFS] avoid xfs_getattr in XFS_IOC_FSGETXATTR ioctl [XFS] get_bulkall() could return incorrect inode state [XFS] Kill unused IOMAP_EOF flag [XFS] fix when DMAPI mount option processing happens [XFS] ensure file size is logged on synchronous writes [XFS] growlock should be a mutex [XFS] replace some large xfs_log_priv.h macros by proper functions [XFS] kill struct bhv_vfs [XFS] move syncing related members from struct bhv_vfs to struct xfs_mount [XFS] kill the vfs_flags member in struct bhv_vfs [XFS] kill the vfs_fsid and vfs_altfsid members in struct bhv_vfs ...
Diffstat (limited to 'fs/xfs/xfs_fsops.c')
-rw-r--r--fs/xfs/xfs_fsops.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c
index 432e82347ed6..c92d5b821029 100644
--- a/fs/xfs/xfs_fsops.c
+++ b/fs/xfs/xfs_fsops.c
@@ -136,7 +136,6 @@ xfs_growfs_data_private(
136 xfs_rfsblock_t nfree; 136 xfs_rfsblock_t nfree;
137 xfs_agnumber_t oagcount; 137 xfs_agnumber_t oagcount;
138 int pct; 138 int pct;
139 xfs_sb_t *sbp;
140 xfs_trans_t *tp; 139 xfs_trans_t *tp;
141 140
142 nb = in->newblocks; 141 nb = in->newblocks;
@@ -175,7 +174,7 @@ xfs_growfs_data_private(
175 memset(&mp->m_perag[oagcount], 0, 174 memset(&mp->m_perag[oagcount], 0,
176 (nagcount - oagcount) * sizeof(xfs_perag_t)); 175 (nagcount - oagcount) * sizeof(xfs_perag_t));
177 mp->m_flags |= XFS_MOUNT_32BITINODES; 176 mp->m_flags |= XFS_MOUNT_32BITINODES;
178 nagimax = xfs_initialize_perag(XFS_MTOVFS(mp), mp, nagcount); 177 nagimax = xfs_initialize_perag(mp, nagcount);
179 up_write(&mp->m_peraglock); 178 up_write(&mp->m_peraglock);
180 } 179 }
181 tp = xfs_trans_alloc(mp, XFS_TRANS_GROWFS); 180 tp = xfs_trans_alloc(mp, XFS_TRANS_GROWFS);
@@ -377,8 +376,7 @@ xfs_growfs_data_private(
377 error, agno); 376 error, agno);
378 break; 377 break;
379 } 378 }
380 sbp = XFS_BUF_TO_SBP(bp); 379 xfs_sb_to_disk(XFS_BUF_TO_SBP(bp), &mp->m_sb, XFS_SB_ALL_BITS);
381 xfs_xlatesb(sbp, &mp->m_sb, -1, XFS_SB_ALL_BITS);
382 /* 380 /*
383 * If we get an error writing out the alternate superblocks, 381 * If we get an error writing out the alternate superblocks,
384 * just issue a warning and continue. The real work is 382 * just issue a warning and continue. The real work is
@@ -435,10 +433,10 @@ xfs_growfs_data(
435 xfs_growfs_data_t *in) 433 xfs_growfs_data_t *in)
436{ 434{
437 int error; 435 int error;
438 if (!cpsema(&mp->m_growlock)) 436 if (!mutex_trylock(&mp->m_growlock))
439 return XFS_ERROR(EWOULDBLOCK); 437 return XFS_ERROR(EWOULDBLOCK);
440 error = xfs_growfs_data_private(mp, in); 438 error = xfs_growfs_data_private(mp, in);
441 vsema(&mp->m_growlock); 439 mutex_unlock(&mp->m_growlock);
442 return error; 440 return error;
443} 441}
444 442
@@ -448,10 +446,10 @@ xfs_growfs_log(
448 xfs_growfs_log_t *in) 446 xfs_growfs_log_t *in)
449{ 447{
450 int error; 448 int error;
451 if (!cpsema(&mp->m_growlock)) 449 if (!mutex_trylock(&mp->m_growlock))
452 return XFS_ERROR(EWOULDBLOCK); 450 return XFS_ERROR(EWOULDBLOCK);
453 error = xfs_growfs_log_private(mp, in); 451 error = xfs_growfs_log_private(mp, in);
454 vsema(&mp->m_growlock); 452 mutex_unlock(&mp->m_growlock);
455 return error; 453 return error;
456} 454}
457 455
@@ -628,8 +626,7 @@ xfs_fs_goingdown(
628{ 626{
629 switch (inflags) { 627 switch (inflags) {
630 case XFS_FSOP_GOING_FLAGS_DEFAULT: { 628 case XFS_FSOP_GOING_FLAGS_DEFAULT: {
631 struct bhv_vfs *vfsp = XFS_MTOVFS(mp); 629 struct super_block *sb = freeze_bdev(mp->m_super->s_bdev);
632 struct super_block *sb = freeze_bdev(vfsp->vfs_super->s_bdev);
633 630
634 if (sb && !IS_ERR(sb)) { 631 if (sb && !IS_ERR(sb)) {
635 xfs_force_shutdown(mp, SHUTDOWN_FORCE_UMOUNT); 632 xfs_force_shutdown(mp, SHUTDOWN_FORCE_UMOUNT);