* Make existing snapshots read-only? @ 2012-05-28 18:37 Bruce Guenter 2012-05-29 0:40 ` Li Zefan 2012-05-29 11:56 ` Stephane Chazelas 0 siblings, 2 replies; 5+ messages in thread From: Bruce Guenter @ 2012-05-28 18:37 UTC (permalink / raw) To: linux-btrfs [-- Attachment #1: Type: text/plain, Size: 228 bytes --] Is there any way to mark existing snapshots as read-only? Making new ones read-only is easy enough, but what about existing ones? Thanks. -- Bruce Guenter <bruce@untroubled.org> http://untroubled.org/ [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Make existing snapshots read-only? 2012-05-28 18:37 Make existing snapshots read-only? Bruce Guenter @ 2012-05-29 0:40 ` Li Zefan 2012-05-29 11:18 ` David Sterba 2012-05-29 11:56 ` Stephane Chazelas 1 sibling, 1 reply; 5+ messages in thread From: Li Zefan @ 2012-05-29 0:40 UTC (permalink / raw) To: bruce; +Cc: linux-btrfs On 2012/5/29 2:37, Bruce Guenter wrote: > > Is there any way to mark existing snapshots as read-only? Making new > ones read-only is easy enough, but what about existing ones? > We have code in the kernel side, so what we need to do is to update btrfs-progs, which is trivial. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Make existing snapshots read-only? 2012-05-29 0:40 ` Li Zefan @ 2012-05-29 11:18 ` David Sterba 2012-05-29 11:33 ` cwillu 0 siblings, 1 reply; 5+ messages in thread From: David Sterba @ 2012-05-29 11:18 UTC (permalink / raw) To: Li Zefan; +Cc: bruce, linux-btrfs On Tue, May 29, 2012 at 08:40:10AM +0800, Li Zefan wrote: > > Is there any way to mark existing snapshots as read-only? Making new > > ones read-only is easy enough, but what about existing ones? > > We have code in the kernel side, so what we need to do is to update btrfs-progs, > which is trivial. Well, I don't like that it's even possible to turn a RO snapshot to a RW one. What was the rationale behind this back then? Besides, I think that it could break assumptions in the backref code. If it's only a one-way operation from a regular subvol -> RO subvol, this sounds reasonable to me. If the opposite direction is allowed, then I'd not call it 'read-only' but "unwritable on-request". david ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Make existing snapshots read-only? 2012-05-29 11:18 ` David Sterba @ 2012-05-29 11:33 ` cwillu 0 siblings, 0 replies; 5+ messages in thread From: cwillu @ 2012-05-29 11:33 UTC (permalink / raw) To: dave, Li Zefan, bruce, linux-btrfs On Tue, May 29, 2012 at 5:18 AM, David Sterba <dave@jikos.cz> wrote: > On Tue, May 29, 2012 at 08:40:10AM +0800, Li Zefan wrote: >> > Is there any way to mark existing snapshots as read-only? Making new >> > ones read-only is easy enough, but what about existing ones? >> >> We have code in the kernel side, so what we need to do is to update btrfs-progs, >> which is trivial. > > Well, I don't like that it's even possible to turn a RO snapshot to a RW > one. What was the rationale behind this back then? Besides, I think that > it could break assumptions in the backref code. > > If it's only a one-way operation from a regular subvol -> RO subvol, > this sounds reasonable to me. If the opposite direction is allowed, then > I'd not call it 'read-only' but "unwritable on-request". Is anyone actually expecting readonly-snapshots to be a worm implementation? And are they sane to expect it? So long as the permissions required to change it are sane (admin rights to change an arbitrary snapshot, possibly something like write-permission on the mountpoint to change otherwise), I don't see the gain. It's not like root can't modify the disk directly, so withholding an easy way to flip the readonly bit just strikes me as a nuisance feature. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Make existing snapshots read-only? 2012-05-28 18:37 Make existing snapshots read-only? Bruce Guenter 2012-05-29 0:40 ` Li Zefan @ 2012-05-29 11:56 ` Stephane Chazelas 1 sibling, 0 replies; 5+ messages in thread From: Stephane Chazelas @ 2012-05-29 11:56 UTC (permalink / raw) To: linux-btrfs 2012-05-28 12:37:00 -0600, Bruce Guenter: > > Is there any way to mark existing snapshots as read-only? Making new > ones read-only is easy enough, but what about existing ones? [...] you can always do btrfs sub snap -r vol vol-ro btrfs sub del vol mv vol-ro vol -- Stephane ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-05-29 12:10 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-05-28 18:37 Make existing snapshots read-only? Bruce Guenter 2012-05-29 0:40 ` Li Zefan 2012-05-29 11:18 ` David Sterba 2012-05-29 11:33 ` cwillu 2012-05-29 11:56 ` Stephane Chazelas
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).