Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 213268
b: refs/heads/master
c: 61ba35d
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Hellwig authored and Alex Elder committed Oct 18, 2010
1 parent a5a7a51 commit 164919a
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 30 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 50f59e8eed85ec4c79bc2454ed50c7886f6c5ebf
refs/heads/master: 61ba35dea0593fbc8d062cab3e4c4c3da5ce7104
6 changes: 4 additions & 2 deletions trunk/fs/xfs/linux-2.6/xfs_super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1518,8 +1518,9 @@ xfs_fs_fill_super(
if (error)
goto out_free_fsname;

if (xfs_icsb_init_counters(mp))
mp->m_flags |= XFS_MOUNT_NO_PERCPU_SB;
error = xfs_icsb_init_counters(mp);
if (error)
goto out_close_devices;

error = xfs_readsb(mp, flags);
if (error)
Expand Down Expand Up @@ -1580,6 +1581,7 @@ xfs_fs_fill_super(
xfs_freesb(mp);
out_destroy_counters:
xfs_icsb_destroy_counters(mp);
out_close_devices:
xfs_close_devices(mp);
out_free_fsname:
xfs_free_fsname(mp);
Expand Down
40 changes: 15 additions & 25 deletions trunk/fs/xfs/xfs_mount.c
Original file line number Diff line number Diff line change
Expand Up @@ -1856,12 +1856,8 @@ xfs_mod_incore_sb(
case XFS_SBS_ICOUNT:
case XFS_SBS_IFREE:
case XFS_SBS_FDBLOCKS:
if (!(mp->m_flags & XFS_MOUNT_NO_PERCPU_SB)) {
status = xfs_icsb_modify_counters(mp, field,
delta, rsvd);
break;
}
/* FALLTHROUGH */
status = xfs_icsb_modify_counters(mp, field, delta, rsvd);
break;
#endif
default:
spin_lock(&mp->m_sb_lock);
Expand Down Expand Up @@ -1910,15 +1906,12 @@ xfs_mod_incore_sb_batch(xfs_mount_t *mp, xfs_mod_sb_t *msb, uint nmsb, int rsvd)
case XFS_SBS_ICOUNT:
case XFS_SBS_IFREE:
case XFS_SBS_FDBLOCKS:
if (!(mp->m_flags & XFS_MOUNT_NO_PERCPU_SB)) {
spin_unlock(&mp->m_sb_lock);
status = xfs_icsb_modify_counters(mp,
msbp->msb_field,
msbp->msb_delta, rsvd);
spin_lock(&mp->m_sb_lock);
break;
}
/* FALLTHROUGH */
spin_unlock(&mp->m_sb_lock);
status = xfs_icsb_modify_counters(mp,
msbp->msb_field,
msbp->msb_delta, rsvd);
spin_lock(&mp->m_sb_lock);
break;
#endif
default:
status = xfs_mod_incore_sb_unlocked(mp,
Expand Down Expand Up @@ -1948,16 +1941,13 @@ xfs_mod_incore_sb_batch(xfs_mount_t *mp, xfs_mod_sb_t *msb, uint nmsb, int rsvd)
case XFS_SBS_ICOUNT:
case XFS_SBS_IFREE:
case XFS_SBS_FDBLOCKS:
if (!(mp->m_flags & XFS_MOUNT_NO_PERCPU_SB)) {
spin_unlock(&mp->m_sb_lock);
status = xfs_icsb_modify_counters(mp,
msbp->msb_field,
-(msbp->msb_delta),
rsvd);
spin_lock(&mp->m_sb_lock);
break;
}
/* FALLTHROUGH */
spin_unlock(&mp->m_sb_lock);
status = xfs_icsb_modify_counters(mp,
msbp->msb_field,
-(msbp->msb_delta),
rsvd);
spin_lock(&mp->m_sb_lock);
break;
#endif
default:
status = xfs_mod_incore_sb_unlocked(mp,
Expand Down
2 changes: 0 additions & 2 deletions trunk/fs/xfs/xfs_mount.h
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,6 @@ typedef struct xfs_mount {
#define XFS_MOUNT_DIRSYNC (1ULL << 21) /* synchronous directory ops */
#define XFS_MOUNT_COMPAT_IOSIZE (1ULL << 22) /* don't report large preferred
* I/O size in stat() */
#define XFS_MOUNT_NO_PERCPU_SB (1ULL << 23) /* don't use per-cpu superblock
counters */
#define XFS_MOUNT_FILESTREAMS (1ULL << 24) /* enable the filestreams
allocator */
#define XFS_MOUNT_NOATTR2 (1ULL << 25) /* disable use of attr2 format */
Expand Down

0 comments on commit 164919a

Please sign in to comment.