public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Donald Douwsma <donaldd@sgi.com>
To: Christoph Hellwig <hch@lst.de>
Cc: xfs@oss.sgi.com, jasper@amiton.co.nz
Subject: Re: [PATCH] stop rejecting options in remount
Date: Mon, 11 Aug 2008 13:42:47 +1000	[thread overview]
Message-ID: <489FB537.70001@sgi.com> (raw)
In-Reply-To: <20080809195159.GA8562@lst.de>

Christoph Hellwig wrote:
> Thanks to some not so nice code in mount(8) we can't blindly reject moun
> options we don't support to be changed in remount.  See the comment in
> the code for more details.
> 
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> 
> Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.c
> ===================================================================
> --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_super.c	2008-08-09 16:34:33.000000000 -0300
> +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.c	2008-08-09 16:36:55.000000000 -0300
> @@ -1349,9 +1349,28 @@ xfs_fs_remount(
>  			mp->m_flags &= ~XFS_MOUNT_BARRIER;
>  			break;
>  		default:
> +			/*
> +			 * Logically we would return an error here to prevent
> +			 * users from believing they might have changed
> +			 * mount options using remount which can't be changed.
> +			 *
> +			 * But unfortunately mount(8) adds all options from
> +			 * mtab and fstab to the mount arguments in some
> +			 * cases so we can't blindly reject options.
> +			 *
> +			 * The workaround for that behaviour will be to
> +			 * check for each specified option whether it actually
> +			 * is a change compared to the status quo and if yes
> +			 * silently ignore it or otherwise reject the remount
> +			 * and tell the user about the reason.
> +			 */
> +#if 0
>  			printk(KERN_INFO
>  	"XFS: mount option \"%s\" not supported for remount\n", p);
>  			return -EINVAL;
> +#else
> +			return 0;
> +#endif
>  		}
>  	}
>  

We should sill issue a warning that the option was ignored. It's not as
obvious as refusing the mount but will allow some kind of triage if
strange behavior results.

Don

      reply	other threads:[~2008-08-11  3:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-09 19:51 [PATCH] stop rejecting options in remount Christoph Hellwig
2008-08-11  3:42 ` Donald Douwsma [this message]

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=489FB537.70001@sgi.com \
    --to=donaldd@sgi.com \
    --cc=hch@lst.de \
    --cc=jasper@amiton.co.nz \
    --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