Re: immutable (WORM) file system

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 12, 2012 at 12:36:13PM -0700, Fong Vang wrote:
> Does anyone know if there's a plan to provide an option to make a
> BTRFS filesystem a WORM (write-one-read-many)?  So essentially, once a
> file has been written it cannot be altered nor deleted.  To delete
> would require a newfs.  I know that there's extended attributes but
> root can alter that on individual files.

There's a btrfs-specific per-inode flag BTRFS_INODE_READONLY, it is used
in just one place (to check inode permissions upon write) and denies any
write operation. There's no direct way (like an ioctl call) to either
add or remove this flag, so it fullfils one half of what you want.

It's possible to enhance mkfs to set this flag to all files when
prefilled from a directory (option -r). For a change in a mounted
filesystem, a new ioctl doing the one-way switch to RO would be needed.

(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.)


david
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux