diff options
| -rw-r--r-- | fs/xfs/xfs_vfsops.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c index 3bba1a6aba8b..23579ff374c5 100644 --- a/fs/xfs/xfs_vfsops.c +++ b/fs/xfs/xfs_vfsops.c | |||
| @@ -1763,18 +1763,7 @@ xfs_parseargs( | |||
| 1763 | char *this_char, *value, *eov; | 1763 | char *this_char, *value, *eov; |
| 1764 | int dsunit, dswidth, vol_dsunit, vol_dswidth; | 1764 | int dsunit, dswidth, vol_dsunit, vol_dswidth; |
| 1765 | int iosize; | 1765 | int iosize; |
| 1766 | 1766 | int ikeep = 0; | |
| 1767 | /* | ||
| 1768 | * Applications using DMI filesystems often expect the | ||
| 1769 | * inode generation number to be monotonically increasing. | ||
| 1770 | * If we delete inode chunks we break this assumption, so | ||
| 1771 | * keep unused inode chunks on disk for DMI filesystems | ||
| 1772 | * until we come up with a better solution. | ||
| 1773 | * Note that if "ikeep" or "noikeep" mount options are | ||
| 1774 | * supplied, then they are honored. | ||
| 1775 | */ | ||
| 1776 | if (!(args->flags & XFSMNT_DMAPI)) | ||
| 1777 | args->flags |= XFSMNT_IDELETE; | ||
| 1778 | 1767 | ||
| 1779 | args->flags |= XFSMNT_BARRIER; | 1768 | args->flags |= XFSMNT_BARRIER; |
| 1780 | args->flags2 |= XFSMNT2_COMPAT_IOSIZE; | 1769 | args->flags2 |= XFSMNT2_COMPAT_IOSIZE; |
| @@ -1905,6 +1894,7 @@ xfs_parseargs( | |||
| 1905 | } else if (!strcmp(this_char, MNTOPT_NOBARRIER)) { | 1894 | } else if (!strcmp(this_char, MNTOPT_NOBARRIER)) { |
| 1906 | args->flags &= ~XFSMNT_BARRIER; | 1895 | args->flags &= ~XFSMNT_BARRIER; |
| 1907 | } else if (!strcmp(this_char, MNTOPT_IKEEP)) { | 1896 | } else if (!strcmp(this_char, MNTOPT_IKEEP)) { |
| 1897 | ikeep = 1; | ||
| 1908 | args->flags &= ~XFSMNT_IDELETE; | 1898 | args->flags &= ~XFSMNT_IDELETE; |
| 1909 | } else if (!strcmp(this_char, MNTOPT_NOIKEEP)) { | 1899 | } else if (!strcmp(this_char, MNTOPT_NOIKEEP)) { |
| 1910 | args->flags |= XFSMNT_IDELETE; | 1900 | args->flags |= XFSMNT_IDELETE; |
| @@ -2003,6 +1993,18 @@ xfs_parseargs( | |||
| 2003 | return EINVAL; | 1993 | return EINVAL; |
| 2004 | } | 1994 | } |
| 2005 | 1995 | ||
| 1996 | /* | ||
| 1997 | * Applications using DMI filesystems often expect the | ||
| 1998 | * inode generation number to be monotonically increasing. | ||
| 1999 | * If we delete inode chunks we break this assumption, so | ||
| 2000 | * keep unused inode chunks on disk for DMI filesystems | ||
| 2001 | * until we come up with a better solution. | ||
| 2002 | * Note that if "ikeep" or "noikeep" mount options are | ||
| 2003 | * supplied, then they are honored. | ||
| 2004 | */ | ||
| 2005 | if (!(args->flags & XFSMNT_DMAPI) && !ikeep) | ||
| 2006 | args->flags |= XFSMNT_IDELETE; | ||
| 2007 | |||
| 2006 | if ((args->flags & XFSMNT_NOALIGN) != XFSMNT_NOALIGN) { | 2008 | if ((args->flags & XFSMNT_NOALIGN) != XFSMNT_NOALIGN) { |
| 2007 | if (dsunit) { | 2009 | if (dsunit) { |
| 2008 | args->sunit = dsunit; | 2010 | args->sunit = dsunit; |
