(Cc: Sage Weil s...@newdream.net for changes in async snapshots)
This patchset adds readonly-snapshots support. You can create a
readonly snapshot, and you can also set a snapshot readonly/writable
on the fly.
A few readonly checks are added in setattr, permission, remove_xattr
and set_xattr
So we don't have to add new structures as we create more ioctls
for snapshots.
Now to create async snapshot, set BTRFS_SNAPSHOT_CREATE_ASYNC bit of
vol_arg_v2-flags, and then call ioctl(BTRFS_IOCT_SNAP_CREATE_V2).
Note: this changes the async snapshot ioctl ABI, which was merged
in .37 merge
In btrfs_ioctl_snap_create(), vol_args_v2 is not freed if
copy_to_user() returns failure.
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
fs/btrfs/ioctl.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index d3f1a60..ba437ad 100644
This eliminates duplicate code in find_and_setup_root() and
btrfs_read_fs_root_no_radix().
(Prepare for the next patch)
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
fs/btrfs/disk-io.c | 31 +++
1 files changed, 15 insertions(+), 16 deletions(-)
diff --git
Usage:
Set BTRFS_SNAPSHOT_CREATE_RDONLY of btrfs_ioctl_vol_arg_v2-flags,
and call ioctl(BTRFS_I0CTL_SNAP_CREATE_V2).
Implementation:
- In disk set readonly bit of btrfs_root_item-flags, and in memory
set btrfs_root-readonly.
- Add readonly checks in btrfs_permission (inode_permission),
This allows us to set a snapshot readonly or writable on the fly.
Usage:
Set BTRFS_SNAPSHOT_RDONLY/WRITABLE of btrfs_ioctl_vol_arg_v2-flags,
and then call ioctl(BTRFS_IOCTL_SNAP_SETFLAGS);
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
fs/btrfs/ioctl.c | 88
Excerpts from Mitch Harder's message of 2010-11-27 17:53:23 -0500:
I've been getting a compile error when building the 'next-rc' branch
of btrfs-unstable.
CC fs/btrfs/disk-io.o
fs/btrfs/disk-io.c: In function ‘btree_migratepage’:
fs/btrfs/disk-io.c:716: error: called object ‘0u’ is
Hi everyone,
The master branch of the btrfs unstable tree:
git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git master
Has a collection of btrfs bug fixes.
The three most important fixes here address crashes in the btrfs
O_DIRECT code, add a migrate_page operation to avoid
On Sun, Nov 28, 2010 at 4:07 AM, C Anthony Risinger anth...@extof.me wrote:
On Nov 27, 2010, at 10:22 PM, Calvin Walton calvin.wal...@gmail.com
wrote:
On Sat, 2010-11-27 at 21:19 -0600, C Anthony Risinger wrote:
eg. if i have a regular directory (not a subvolume) in the top-
level:
/__boot
On Wed, Nov 17, 2010 at 8:08 PM, Li Zefan l...@cn.fujitsu.com wrote:
Hi Chris,
Here's the updated patchset. As I still haven't got a kernel.org
account, I have set up a git tree in another public git repository,
and I'll use it for now.
You can pull from:
On Monday, 29 November, 2010, you (Erik Jensen) wrote:
I have a similar setup on one of my computers. I set it up a while ago
using an initramfs, but I could not get the device scan to work properly,
for whatever reason. I ended up having it just trying to mount every device
in the array in
Hi Li,
great work, but I have some suggestions:
On Monday, 29 November, 2010, Li Zefan wrote:
So we don't have to add new structures as we create more ioctls
for snapshots.
Now to create async snapshot, set BTRFS_SNAPSHOT_CREATE_ASYNC bit of
vol_arg_v2-flags, and then call
Hi Li,
On Monday, 29 November, 2010, Li Zefan wrote:
This allows us to set a snapshot readonly or writable on the fly.
Usage:
Set BTRFS_SNAPSHOT_RDONLY/WRITABLE of btrfs_ioctl_vol_arg_v2-flags,
and then call ioctl(BTRFS_IOCTL_SNAP_SETFLAGS);
I really appreciate your work, but I have some
On Monday, 29 November, 2010, Goffredo Baroncelli wrote:
Why the unused fields ? What happens if you use a more recent btrfs-tools
which take advantage of these fields but the kernel is an old one ? At the
minimum please check the flags so
Hi Li,
On Mon, 29 Nov 2010, Li Zefan wrote:
So we don't have to add new structures as we create more ioctls
for snapshots.
Now to create async snapshot, set BTRFS_SNAPSHOT_CREATE_ASYNC bit of
vol_arg_v2-flags, and then call ioctl(BTRFS_IOCT_SNAP_CREATE_V2).
Note: this changes the async
On Mon, Nov 29, 2010 at 12:02 AM, Li Zefan l...@cn.fujitsu.com wrote:
(Cc: Sage Weil s...@newdream.net for changes in async snapshots)
This patchset adds readonly-snapshots support. You can create a
readonly snapshot, and you can also set a snapshot readonly/writable
on the fly.
A few
On Thu, Nov 25, 2010 at 05:52:47PM +0800, Miao Xie wrote:
Btrfs has a number of BUG_ON()s, which may lead btrfs to unpleasant panic.
Meanwhile, they are very ugly and should be handled more propriately.
There are mainly two ways to deal with these BUG_ON()s.
1. For those errors which can
On 11/29/10 21:02, Mike Fedyk wrote:
On Mon, Nov 29, 2010 at 12:02 AM, Li Zefanl...@cn.fujitsu.com wrote:
(Cc: Sage Weils...@newdream.net for changes in async snapshots)
This patchset adds readonly-snapshots support. You can create a
readonly snapshot, and you can also set a snapshot
Hello,
I decided to test the 'defragment' feature on my system (after a huge number of
system updates and prelinking):
find /bin /sbin /lib /usr/lib /usr/bin /usr/sbin -type d -exec btrfs
filesystem defragment '{}' '+'
I have already defragmented a couple of (very large) directories
On Mon, Nov 29, 2010 at 12:41 PM, David Arendt ad...@prnet.org wrote:
On 11/29/10 21:02, Mike Fedyk wrote:
On Mon, Nov 29, 2010 at 12:02 AM, Li Zefanl...@cn.fujitsu.com wrote:
(Cc: Sage Weils...@newdream.net for changes in async snapshots)
This patchset adds readonly-snapshots support.
On Mon, Nov 29, 2010 at 12:10 PM, Josef Bacik jo...@redhat.com wrote:
On Thu, Nov 25, 2010 at 05:52:47PM +0800, Miao Xie wrote:
Btrfs has a number of BUG_ON()s, which may lead btrfs to unpleasant panic.
Meanwhile, they are very ugly and should be handled more propriately.
There are mainly two
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Mon, Nov 29, 2010 at 10:02:56PM +0100, Andrej Podzimek wrote:
Hello,
I decided to test the 'defragment' feature on my system (after a huge number
of system updates and prelinking):
find /bin /sbin /lib /usr/lib /usr/bin /usr/sbin
This may sound excessive as any new concept introduction that late in
development, but readonly/writable snapshots could be further
differentiated by naming the latter clones. This way end-user would
naturally perceive snapsot as read-only PIT fs image, while clone
would naturally refer to
On Mon, Nov 29, 2010 at 1:31 PM, Andrey Kuzmin
andrey.v.kuz...@gmail.com wrote:
This may sound excessive as any new concept introduction that late in
development, but readonly/writable snapshots could be further
differentiated by naming the latter clones. This way end-user would
naturally
Hello,
I decided to test the 'defragment' feature on my system (after a huge number of
system updates and prelinking):
find /bin /sbin /lib /usr/lib /usr/bin /usr/sbin -type d -exec btrfs
filesystem defragment '{}' '+'
I have already defragmented a couple of (very large) directories
On Thu, 25 Nov 2010 14:53:56 +1100
Nick Piggin npig...@kernel.dk wrote:
On Wed, Nov 24, 2010 at 02:10:28PM +0100, Jan Kara wrote:
On Wed 24-11-10 12:03:43, Nick Piggin wrote:
For the _nr variant that btrfs uses, it's worse for the filesystems
that don't have a 1:1 bdi-sb
On Mon, Nov 29, 2010 at 02:26:03PM -0800, Andrew Morton wrote:
On Thu, 25 Nov 2010 14:53:56 +1100
Nick Piggin npig...@kernel.dk wrote:
On Wed, Nov 24, 2010 at 02:10:28PM +0100, Jan Kara wrote:
Well, for now, the easiest and simplest fix is my patch, I think. The
objection is that we
On Nov 29, 2010, at 3:48 PM, Andrey Kuzmin andrey.v.kuz...@gmail.com
wrote:
I'm not sure why zfs came up, they don't own the term :). As to
zfs/overhead topic, I doubt there's any difference between clone and
writable shapshot (there should be none, of course, it's just two
different names
Goffredo Baroncelli wrote:
Hi Li,
great work, but I have some suggestions:
On Monday, 29 November, 2010, Li Zefan wrote:
So we don't have to add new structures as we create more ioctls
for snapshots.
Now to create async snapshot, set BTRFS_SNAPSHOT_CREATE_ASYNC bit of
vol_arg_v2-flags,
On 11/30/2010 04:10 AM, Josef Bacik wrote:
On Thu, Nov 25, 2010 at 05:52:47PM +0800, Miao Xie wrote:
Btrfs has a number of BUG_ON()s, which may lead btrfs to unpleasant panic.
Meanwhile, they are very ugly and should be handled more propriately.
There are mainly two ways to deal with these
C Anthony Risinger wrote:
On Nov 29, 2010, at 3:48 PM, Andrey Kuzmin andrey.v.kuz...@gmail.com
wrote:
I'm not sure why zfs came up, they don't own the term :). As to
zfs/overhead topic, I doubt there's any difference between clone and
writable shapshot (there should be none, of course, it's
On Tue, Nov 30, 2010 at 10:03:58AM +0800, liubo wrote:
On 11/30/2010 04:10 AM, Josef Bacik wrote:
On Thu, Nov 25, 2010 at 05:52:47PM +0800, Miao Xie wrote:
Btrfs has a number of BUG_ON()s, which may lead btrfs to unpleasant panic.
Meanwhile, they are very ugly and should be handled more
On 11/30/2010 10:30 AM, Josef Bacik wrote:
On Tue, Nov 30, 2010 at 10:03:58AM +0800, liubo wrote:
On 11/30/2010 04:10 AM, Josef Bacik wrote:
On Thu, Nov 25, 2010 at 05:52:47PM +0800, Miao Xie wrote:
Btrfs has a number of BUG_ON()s, which may lead btrfs to unpleasant panic.
Meanwhile, they are
Hi Li,
Messaggio originale
Da: l...@cn.fujitsu.com
Data: 30/11/2010 8.03
A: kreij...@libero.it
Cc: linux-btrfs@vger.kernel.org
Ogg: Re: [PATCH 5/5] btrfs: Add ioctl to set snapshot readonly/writable
Goffredo Baroncelli wrote:
Hi Li,
On Monday, 29 November, 2010, Li Zefan wrote:
This
34 matches
Mail list logo