aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/xfs/linux-2.6/xfs_super.c14
-rw-r--r--fs/xfs/xfs_clnt.h2
-rw-r--r--fs/xfs/xfs_ialloc.c2
-rw-r--r--fs/xfs/xfs_mount.h2
-rw-r--r--fs/xfs/xfs_vfsops.c4
5 files changed, 12 insertions, 12 deletions
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c
index 21dfc9da235e..8831d9518790 100644
--- a/fs/xfs/linux-2.6/xfs_super.c
+++ b/fs/xfs/linux-2.6/xfs_super.c
@@ -171,7 +171,7 @@ xfs_parseargs(
171 char *this_char, *value, *eov; 171 char *this_char, *value, *eov;
172 int dsunit, dswidth, vol_dsunit, vol_dswidth; 172 int dsunit, dswidth, vol_dsunit, vol_dswidth;
173 int iosize; 173 int iosize;
174 int ikeep = 0; 174 int dmapi_implies_ikeep = 1;
175 175
176 args->flags |= XFSMNT_BARRIER; 176 args->flags |= XFSMNT_BARRIER;
177 args->flags2 |= XFSMNT2_COMPAT_IOSIZE; 177 args->flags2 |= XFSMNT2_COMPAT_IOSIZE;
@@ -302,10 +302,10 @@ xfs_parseargs(
302 } else if (!strcmp(this_char, MNTOPT_NOBARRIER)) { 302 } else if (!strcmp(this_char, MNTOPT_NOBARRIER)) {
303 args->flags &= ~XFSMNT_BARRIER; 303 args->flags &= ~XFSMNT_BARRIER;
304 } else if (!strcmp(this_char, MNTOPT_IKEEP)) { 304 } else if (!strcmp(this_char, MNTOPT_IKEEP)) {
305 ikeep = 1; 305 args->flags |= XFSMNT_IKEEP;
306 args->flags &= ~XFSMNT_IDELETE;
307 } else if (!strcmp(this_char, MNTOPT_NOIKEEP)) { 306 } else if (!strcmp(this_char, MNTOPT_NOIKEEP)) {
308 args->flags |= XFSMNT_IDELETE; 307 dmapi_implies_ikeep = 0;
308 args->flags &= ~XFSMNT_IKEEP;
309 } else if (!strcmp(this_char, MNTOPT_LARGEIO)) { 309 } else if (!strcmp(this_char, MNTOPT_LARGEIO)) {
310 args->flags2 &= ~XFSMNT2_COMPAT_IOSIZE; 310 args->flags2 &= ~XFSMNT2_COMPAT_IOSIZE;
311 } else if (!strcmp(this_char, MNTOPT_NOLARGEIO)) { 311 } else if (!strcmp(this_char, MNTOPT_NOLARGEIO)) {
@@ -410,8 +410,8 @@ xfs_parseargs(
410 * Note that if "ikeep" or "noikeep" mount options are 410 * Note that if "ikeep" or "noikeep" mount options are
411 * supplied, then they are honored. 411 * supplied, then they are honored.
412 */ 412 */
413 if (!(args->flags & XFSMNT_DMAPI) && !ikeep) 413 if ((args->flags & XFSMNT_DMAPI) && dmapi_implies_ikeep)
414 args->flags |= XFSMNT_IDELETE; 414 args->flags |= XFSMNT_IKEEP;
415 415
416 if ((args->flags & XFSMNT_NOALIGN) != XFSMNT_NOALIGN) { 416 if ((args->flags & XFSMNT_NOALIGN) != XFSMNT_NOALIGN) {
417 if (dsunit) { 417 if (dsunit) {
@@ -446,6 +446,7 @@ xfs_showargs(
446{ 446{
447 static struct proc_xfs_info xfs_info_set[] = { 447 static struct proc_xfs_info xfs_info_set[] = {
448 /* the few simple ones we can get from the mount struct */ 448 /* the few simple ones we can get from the mount struct */
449 { XFS_MOUNT_IKEEP, "," MNTOPT_IKEEP },
449 { XFS_MOUNT_WSYNC, "," MNTOPT_WSYNC }, 450 { XFS_MOUNT_WSYNC, "," MNTOPT_WSYNC },
450 { XFS_MOUNT_INO64, "," MNTOPT_INO64 }, 451 { XFS_MOUNT_INO64, "," MNTOPT_INO64 },
451 { XFS_MOUNT_NOALIGN, "," MNTOPT_NOALIGN }, 452 { XFS_MOUNT_NOALIGN, "," MNTOPT_NOALIGN },
@@ -461,7 +462,6 @@ xfs_showargs(
461 }; 462 };
462 static struct proc_xfs_info xfs_info_unset[] = { 463 static struct proc_xfs_info xfs_info_unset[] = {
463 /* the few simple ones we can get from the mount struct */ 464 /* the few simple ones we can get from the mount struct */
464 { XFS_MOUNT_IDELETE, "," MNTOPT_IKEEP },
465 { XFS_MOUNT_COMPAT_IOSIZE, "," MNTOPT_LARGEIO }, 465 { XFS_MOUNT_COMPAT_IOSIZE, "," MNTOPT_LARGEIO },
466 { XFS_MOUNT_BARRIER, "," MNTOPT_NOBARRIER }, 466 { XFS_MOUNT_BARRIER, "," MNTOPT_NOBARRIER },
467 { XFS_MOUNT_SMALL_INUMS, "," MNTOPT_64BITINODE }, 467 { XFS_MOUNT_SMALL_INUMS, "," MNTOPT_64BITINODE },
diff --git a/fs/xfs/xfs_clnt.h b/fs/xfs/xfs_clnt.h
index d16c1b971074..d5d1e60ee224 100644
--- a/fs/xfs/xfs_clnt.h
+++ b/fs/xfs/xfs_clnt.h
@@ -86,7 +86,7 @@ struct xfs_mount_args {
86#define XFSMNT_NOUUID 0x01000000 /* Ignore fs uuid */ 86#define XFSMNT_NOUUID 0x01000000 /* Ignore fs uuid */
87#define XFSMNT_DMAPI 0x02000000 /* enable dmapi/xdsm */ 87#define XFSMNT_DMAPI 0x02000000 /* enable dmapi/xdsm */
88#define XFSMNT_BARRIER 0x04000000 /* use write barriers */ 88#define XFSMNT_BARRIER 0x04000000 /* use write barriers */
89#define XFSMNT_IDELETE 0x08000000 /* inode cluster delete */ 89#define XFSMNT_IKEEP 0x08000000 /* inode cluster delete */
90#define XFSMNT_SWALLOC 0x10000000 /* turn on stripe width 90#define XFSMNT_SWALLOC 0x10000000 /* turn on stripe width
91 * allocation */ 91 * allocation */
92#define XFSMNT_DIRSYNC 0x40000000 /* sync creat,link,unlink,rename 92#define XFSMNT_DIRSYNC 0x40000000 /* sync creat,link,unlink,rename
diff --git a/fs/xfs/xfs_ialloc.c b/fs/xfs/xfs_ialloc.c
index c5836b951d0c..db9d5fa600af 100644
--- a/fs/xfs/xfs_ialloc.c
+++ b/fs/xfs/xfs_ialloc.c
@@ -1053,7 +1053,7 @@ xfs_difree(
1053 /* 1053 /*
1054 * When an inode cluster is free, it becomes eligible for removal 1054 * When an inode cluster is free, it becomes eligible for removal
1055 */ 1055 */
1056 if ((mp->m_flags & XFS_MOUNT_IDELETE) && 1056 if (!(mp->m_flags & XFS_MOUNT_IKEEP) &&
1057 (rec.ir_freecount == XFS_IALLOC_INODES(mp))) { 1057 (rec.ir_freecount == XFS_IALLOC_INODES(mp))) {
1058 1058
1059 *delete = 1; 1059 *delete = 1;
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h
index f7c620ec6e69..1d8a4728d847 100644
--- a/fs/xfs/xfs_mount.h
+++ b/fs/xfs/xfs_mount.h
@@ -366,7 +366,7 @@ typedef struct xfs_mount {
366#define XFS_MOUNT_SMALL_INUMS (1ULL << 15) /* users wants 32bit inodes */ 366#define XFS_MOUNT_SMALL_INUMS (1ULL << 15) /* users wants 32bit inodes */
367#define XFS_MOUNT_NOUUID (1ULL << 16) /* ignore uuid during mount */ 367#define XFS_MOUNT_NOUUID (1ULL << 16) /* ignore uuid during mount */
368#define XFS_MOUNT_BARRIER (1ULL << 17) 368#define XFS_MOUNT_BARRIER (1ULL << 17)
369#define XFS_MOUNT_IDELETE (1ULL << 18) /* delete empty inode clusters*/ 369#define XFS_MOUNT_IKEEP (1ULL << 18) /* keep empty inode clusters*/
370#define XFS_MOUNT_SWALLOC (1ULL << 19) /* turn on stripe width 370#define XFS_MOUNT_SWALLOC (1ULL << 19) /* turn on stripe width
371 * allocation */ 371 * allocation */
372#define XFS_MOUNT_RDONLY (1ULL << 20) /* read-only fs */ 372#define XFS_MOUNT_RDONLY (1ULL << 20) /* read-only fs */
diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c
index 413587f02155..7321304a69cc 100644
--- a/fs/xfs/xfs_vfsops.c
+++ b/fs/xfs/xfs_vfsops.c
@@ -281,8 +281,8 @@ xfs_start_flags(
281 mp->m_readio_log = mp->m_writeio_log = ap->iosizelog; 281 mp->m_readio_log = mp->m_writeio_log = ap->iosizelog;
282 } 282 }
283 283
284 if (ap->flags & XFSMNT_IDELETE) 284 if (ap->flags & XFSMNT_IKEEP)
285 mp->m_flags |= XFS_MOUNT_IDELETE; 285 mp->m_flags |= XFS_MOUNT_IKEEP;
286 if (ap->flags & XFSMNT_DIRSYNC) 286 if (ap->flags & XFSMNT_DIRSYNC)
287 mp->m_flags |= XFS_MOUNT_DIRSYNC; 287 mp->m_flags |= XFS_MOUNT_DIRSYNC;
288 if (ap->flags & XFSMNT_ATTR2) 288 if (ap->flags & XFSMNT_ATTR2)