[Top] [All Lists]

Re: [PATCH 1/4] fs: split update_time() into update_time() and write_tim

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 1/4] fs: split update_time() into update_time() and write_time()
From: Theodore Ts'o <tytso@xxxxxxx>
Date: Mon, 24 Nov 2014 10:56:58 -0500
Cc: linux-fsdevel@xxxxxxxxxxxxxxx, Ext4 Developers List <linux-ext4@xxxxxxxxxxxxxxx>, xfs@xxxxxxxxxxx, linux-btrfs@xxxxxxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=thunk.org; s=ef5046eb; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=wEqZ+rB4Q0pk9UbwBfmbbp8qHjVOAUcisxLa/Eixbbs=; b=GC0cdBhEnJ52wUPezjVNUWDUHFDfcZD8Kg21oaszfvcjTgy64eca/Dydkyo+YSWVhzY0X6CePraCSFIeYkuNnI9Pr0PrXDJaxVLAEUEbAVa6NLEcV6nEVm4Ye7tyRZ8nzjCTJbzJvuwE7qKDZLe7P3jmI7tMlEp9aN+DK9ovWrI=;
In-reply-to: <20141124152101.GA12575@xxxxxxxxxxxxx>
References: <1416599964-21892-1-git-send-email-tytso@xxxxxxx> <1416599964-21892-2-git-send-email-tytso@xxxxxxx> <20141124152101.GA12575@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.23 (2014-03-12)
On Mon, Nov 24, 2014 at 07:21:01AM -0800, Christoph Hellwig wrote:
> On Fri, Nov 21, 2014 at 02:59:21PM -0500, Theodore Ts'o wrote:
> > We needed to preserve update_time() because btrfs wants to have a
> > special btrfs_root_readonly() check; otherwise we could drop the
> > update_time() inode operation entirely.
> Can't btrfs just set the immutable flag on every inode that is read
> when the root has the BTRFS_ROOT_SUBVOL_RDONLY flag?  That would
> cut down the places that need this check to the ioctl path so that
> we prevent users from clearling the immutable flag.

Sounds like a good plan to me, although I'm not sure I understand how
BTRFS_ROOT_SUBVOL_RDONLY flag works, since I would have thought there
are all sorts of places in the VFS layer where it is currently
checking MS_RDONLY and MNT_READONLY and _not_ checking
BTRFS_ROOT_SUBVOL_RDONLY isn't causing other problems.

But unless there's something more subtle going on, it would seem to me
that setting the immutable flag on each inode would be a better way to
go in any case.

                                        - Ted

<Prev in Thread] Current Thread [Next in Thread>