Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 107404
b: refs/heads/master
c: 7c12f29
h: refs/heads/master
v: v3
  • Loading branch information
Tim Shimmin authored and Niv Sardi committed Jul 28, 2008
1 parent b27f729 commit f277c5d
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 3 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: f9f6dce01905179d9a209cc1e69fe9047736c112
refs/heads/master: 7c12f296500e1157872ef45b3f3bb06b4b73f1c1
1 change: 1 addition & 0 deletions trunk/fs/xfs/linux-2.6/xfs_super.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ xfs_parseargs(
args->flags |= XFSMNT_ATTR2;
} else if (!strcmp(this_char, MNTOPT_NOATTR2)) {
args->flags &= ~XFSMNT_ATTR2;
args->flags |= XFSMNT_NOATTR2;
} else if (!strcmp(this_char, MNTOPT_FILESTREAM)) {
args->flags2 |= XFSMNT2_FILESTREAMS;
} else if (!strcmp(this_char, MNTOPT_NOQUOTA)) {
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/xfs/xfs_clnt.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ struct xfs_mount_args {
#define XFSMNT_IOSIZE 0x00002000 /* optimize for I/O size */
#define XFSMNT_OSYNCISOSYNC 0x00004000 /* o_sync is REALLY o_sync */
/* (osyncisdsync is default) */
#define XFSMNT_NOATTR2 0x00008000 /* turn off ATTR2 EA format */
#define XFSMNT_32BITINODES 0x00200000 /* restrict inodes to 32
* bits of address space */
#define XFSMNT_GQUOTA 0x00400000 /* group quota accounting */
Expand Down
12 changes: 11 additions & 1 deletion trunk/fs/xfs/xfs_mount.c
Original file line number Diff line number Diff line change
Expand Up @@ -994,9 +994,19 @@ xfs_mountfs(
* Re-check for ATTR2 in case it was found in bad_features2
* slot.
*/
if (xfs_sb_version_hasattr2(&mp->m_sb))
if (xfs_sb_version_hasattr2(&mp->m_sb) &&
!(mp->m_flags & XFS_MOUNT_NOATTR2))
mp->m_flags |= XFS_MOUNT_ATTR2;
}

if (xfs_sb_version_hasattr2(&mp->m_sb) &&
(mp->m_flags & XFS_MOUNT_NOATTR2)) {
xfs_sb_version_removeattr2(&mp->m_sb);
update_flags |= XFS_SB_FEATURES2;

/* update sb_versionnum for the clearing of the morebits */
if (!sbp->sb_features2)
update_flags |= XFS_SB_VERSIONNUM;
}

/*
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/xfs/xfs_mount.h
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@ typedef struct xfs_mount {
counters */
#define XFS_MOUNT_FILESTREAMS (1ULL << 24) /* enable the filestreams
allocator */
#define XFS_MOUNT_NOATTR2 (1ULL << 25) /* disable use of attr2 format */


/*
Expand Down
7 changes: 7 additions & 0 deletions trunk/fs/xfs/xfs_sb.h
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,13 @@ static inline void xfs_sb_version_addattr2(xfs_sb_t *sbp)
((sbp)->sb_features2 | XFS_SB_VERSION2_ATTR2BIT)));
}

static inline void xfs_sb_version_removeattr2(xfs_sb_t *sbp)
{
sbp->sb_features2 &= ~XFS_SB_VERSION2_ATTR2BIT;
if (!sbp->sb_features2)
sbp->sb_versionnum &= ~XFS_SB_VERSION_MOREBITSBIT;
}

/*
* end of superblock version macros
*/
Expand Down
9 changes: 8 additions & 1 deletion trunk/fs/xfs/xfs_vfsops.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,8 @@ xfs_start_flags(
mp->m_flags |= XFS_MOUNT_DIRSYNC;
if (ap->flags & XFSMNT_ATTR2)
mp->m_flags |= XFS_MOUNT_ATTR2;
if (ap->flags & XFSMNT_NOATTR2)
mp->m_flags |= XFS_MOUNT_NOATTR2;

if (ap->flags2 & XFSMNT2_COMPAT_IOSIZE)
mp->m_flags |= XFS_MOUNT_COMPAT_IOSIZE;
Expand Down Expand Up @@ -346,7 +348,12 @@ xfs_finish_flags(
}
}

if (xfs_sb_version_hasattr2(&mp->m_sb))
/*
* mkfs'ed attr2 will turn on attr2 mount unless explicitly
* told by noattr2 to turn it off
*/
if (xfs_sb_version_hasattr2(&mp->m_sb) &&
!(ap->flags & XFSMNT_NOATTR2))
mp->m_flags |= XFS_MOUNT_ATTR2;

/*
Expand Down

0 comments on commit f277c5d

Please sign in to comment.