From: "João Eduardo Luís" <jecluis@gmail.com>
To: Chris Samuel <chris@csamuel.org>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: immutable (WORM) file system
Date: Wed, 14 Mar 2012 11:58:46 +0000 [thread overview]
Message-ID: <9F3580FC-CAAB-4DDA-97BF-5A081E27BCCE@gmail.com> (raw)
In-Reply-To: <201203131117.16977.chris@csamuel.org>
[-- Attachment #1: Type: text/plain, Size: 2872 bytes --]
I'm sure the OP's idea was to allow one to write onto the FS, and have Btrfs dealing with the internal requirements of not allowing further modifications on what exists on the FS. Transparently and without any user-level intervention.
The thing is that, the complexity will always depend on the wanted semantics. If one wants to simply allow 'new files', I believe it should be rather easy to implements, but that leads me to questioning "why Btrfs?".
OTH, if one does want to allow appending onto a file, but making sure new appends (e.g., those between open() and close()) create a new version of the said file, then Btrfs could work for that: append, set new extents RO, snapshot. Although this may not be as simple, it sure looks quite interesting :-)
I guess I'll be on the lookout for further developments on this thread! (if any)
Cheers,
Joao
On Mar 13, 2012, at 12:17 AM, Chris Samuel wrote:
> On Tuesday 13 March 2012 10:40:39 David Sterba wrote:
>
>> (I just know that the flag is there and is related to the question,
>> haven't tested it myself and do not know what was the original
>> intention.)
>
> Not sure it helps, but the commits for these were:
>
> commit fdebe2bd70047e057827cba85ba31b2545e31900
> Author: Yan <yanzheng@21cn.com>
> Date: Mon Jan 14 13:26:08 2008 -0500
>
> Btrfs: Add readonly inode flag
>
> This patch adds readonly inode flag support. A file with this flag
> can't be modified, but can be deleted.
>
> Signed-off-by: Chris Mason <chris.mason@oracle.com>
>
> and..
>
> commit cb6db4e57632ba8589cc2f9fe1d0aa9116b87ab8
> Author: Jeff Mahoney <jeffm@suse.de>
> Date: Mon Aug 15 17:27:21 2011 +0000
> Author: Jeff Mahoney <jeffm@suse.de>
> Date: Mon Aug 15 17:27:21 2011 +0000
>
> btrfs: btrfs_permission's RO check shouldn't apply to device nodes
>
> This patch tightens the read-only access checks in btrfs_permission to
> match the constraints in inode_permission. Currently, even though the
> device node itself will be unmodified, read-write access to device nodes
> is denied to when the device node resides on a read-only subvolume or a
> is a file that has been marked read-only by the btrfs conversion utility.
>
> With this patch applied, the check only affects regular files,
> directories, and symlinks. It also restructures the code a bit so that
> we don't duplicate the MAY_WRITE check for both tests.
>
> Signed-off-by: Jeff Mahoney <jeffm@suse.com>
> Signed-off-by: Chris Mason <chris.mason@oracle.com>
>
> --
> Chris Samuel : http://www.csamuel.org/ : Melbourne, VIC
>
> This email may come with a PGP signature as a file. Do not panic.
> For more info see: http://en.wikipedia.org/wiki/OpenPGP
---
João Eduardo Luís
gpg key: 477C26E5 from pool.keyserver.eu
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 495 bytes --]
prev parent reply other threads:[~2012-03-14 11:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-12 19:36 immutable (WORM) file system Fong Vang
2012-03-12 19:52 ` Chester
2012-03-13 0:09 ` Duncan
2012-03-12 23:40 ` David Sterba
2012-03-13 0:17 ` Chris Samuel
2012-03-14 11:58 ` João Eduardo Luís [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=9F3580FC-CAAB-4DDA-97BF-5A081E27BCCE@gmail.com \
--to=jecluis@gmail.com \
--cc=chris@csamuel.org \
--cc=linux-btrfs@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).