From: Eric Sandeen <sandeen@sandeen.net>
To: xfs-oss <xfs@oss.sgi.com>
Subject: [PATCH] fix mount option pasing to make inode cluster deletion default (again)
Date: Wed, 13 Feb 2008 21:34:06 -0600 [thread overview]
Message-ID: <47B3B6AE.4030505@sandeen.net> (raw)
mod xfs-linux-melb:xfs-kern:29683a /
git commit 574342f4ad450b33bc85ec53210b8aa8bfff2fcf
broke default options in such a way that empty inode clusters
are no longer deleted by default, because if no options are
given, we "goto done;" without setting the default
XFSMNT_IDELETE flag.
All this logic could probably be rearranged to make things
clearer, but for now I think this small patch fixes it:
Set IDELETE a.k.a. "noikeep" by default, but if dmapi is in
use, turn it back off (i.e. "ikeep") *unless* noikeep was
specifically requested.
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
---
Index: linux-2.6.24/fs/xfs/linux-2.6/xfs_super.c
===================================================================
--- linux-2.6.24.orig/fs/xfs/linux-2.6/xfs_super.c
+++ linux-2.6.24/fs/xfs/linux-2.6/xfs_super.c
@@ -171,9 +171,10 @@ xfs_parseargs(
char *this_char, *value, *eov;
int dsunit, dswidth, vol_dsunit, vol_dswidth;
int iosize;
- int ikeep = 0;
+ int noikeep = 0; /* track _explicit_ requests */
args->flags |= XFSMNT_BARRIER;
+ args->flags |= XFSMNT_IDELETE; /* i.e. "noikeep" is default */
args->flags2 |= XFSMNT2_COMPAT_IOSIZE;
if (!options)
@@ -302,9 +303,9 @@ xfs_parseargs(
} else if (!strcmp(this_char, MNTOPT_NOBARRIER)) {
args->flags &= ~XFSMNT_BARRIER;
} else if (!strcmp(this_char, MNTOPT_IKEEP)) {
- ikeep = 1;
args->flags &= ~XFSMNT_IDELETE;
} else if (!strcmp(this_char, MNTOPT_NOIKEEP)) {
+ noikeep = 1; /* explicitly requested */
args->flags |= XFSMNT_IDELETE;
} else if (!strcmp(this_char, MNTOPT_LARGEIO)) {
args->flags2 &= ~XFSMNT2_COMPAT_IOSIZE;
@@ -410,8 +411,8 @@ xfs_parseargs(
* Note that if "ikeep" or "noikeep" mount options are
* supplied, then they are honored.
*/
- if (!(args->flags & XFSMNT_DMAPI) && !ikeep)
- args->flags |= XFSMNT_IDELETE;
+ if ((args->flags & XFSMNT_DMAPI) && !noikeep)
+ args->flags &= ~XFSMNT_IDELETE;
if ((args->flags & XFSMNT_NOALIGN) != XFSMNT_NOALIGN) {
if (dsunit) {
next reply other threads:[~2008-02-14 3:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-14 3:34 Eric Sandeen [this message]
2008-02-14 7:45 ` [PATCH 1/1] XFS: replace *_IDELETE with *_IKEEP Josef 'Jeff' Sipek
2008-02-15 16:19 ` Christoph Hellwig
2008-02-15 16:23 ` Eric Sandeen
2008-02-16 13:22 ` Christoph Hellwig
2008-02-17 21:30 ` Josef 'Jeff' Sipek
2008-02-18 5:33 ` Barry Naujok
2008-02-18 6:26 ` Josef 'Jeff' Sipek
2008-02-18 14:38 ` [PATCH] fix mount option pasing to make inode cluster deletion default (again) Eric Sandeen
2008-02-20 23:39 ` Josef 'Jeff' Sipek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47B3B6AE.4030505@sandeen.net \
--to=sandeen@sandeen.net \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox