All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] Removing a subvolume by an ordinary user
@ 2010-09-16 11:47 kreijack
  2010-09-18 13:15 ` Goffredo Baroncelli
  0 siblings, 1 reply; 2+ messages in thread
From: kreijack @ 2010-09-16 11:47 UTC (permalink / raw)
  To: linux-btrfs

Hi all,

currently BTRFS doesn't allow an ordinary user to remove a subvolume (o=
r=20
snapshot). I think that the reasons is simple: a subvolume may contain=20
files/directories owned by other user.
Allowing an ordinary user to remove a subvolume means allowing an ordin=
ary=20
user to remove filess/directories owned by other user. And this is not =
good.

Moreover BTRFS removes  a subvolume asynchronously, so it is not possib=
le to=20
return an error like =E2=80=9Chey you are trying to remove a not your f=
ile  ! Don=E2=80=99t do=20
it !=E2=80=9D.

My idea is to add another ioctl that permits to remove a subvolume only=
 when=20
it is empty and its host directory is writable by the user=E2=80=A6 lik=
e a directory.=20
An option is to allow to remove an empty subvolume  with the unlink(2) =
syscall:=20
no more tool is needed !=20
This will solve a lot of problem:
-	Consistently with the current unlink(2) behavior
-	The kernel has not to do complicate check
-	There no is necessity to add another interface to wait the releasing =
of the=20
space (see other thread reserving an IOCTL number; other details ).
The disadvantage is that it should be slower than the currently=20
implementation.
Of course I don=E2=80=99t want to remove the existing interface. I want=
 only to add=20
another one.

Comments ? Thoughts ?
Regards
G.Baroncelli=20

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-09-18 13:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-16 11:47 [RFC] Removing a subvolume by an ordinary user kreijack
2010-09-18 13:15 ` Goffredo Baroncelli

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.