Re: [PATCH V2] Removing a subvolume by an ordinary user

2010-10-18 Thread Ian Kent
On Sun, 2010-10-17 at 17:53 +0200, Goffredo Baroncelli wrote: On Tuesday, 12 October, 2010, Ian Kent wrote: On Mon, 2010-10-11 at 20:08 +0200, Goffredo Baroncelli wrote: [...] + ret = btrfs_unlink_subvol(trans, root, dir, + dest-root_key.objectid, +

Re: [PATCH V3] Removing a subvolume with a simple rm -rf

2010-10-18 Thread Ian Kent
On Sun, 2010-10-17 at 18:09 +0200, Goffredo Baroncelli wrote: Hi all, enclosed you can find a new version of the patch which permits to remove a volume via the rmdir(2) syscall by a non-root user. The goal of this patch is to permits to remove a subvolume with a simple rm -rf command.

Re: [patch 2/4] Add an option to show ISO, binary or raw bytes counts using df.

2010-10-18 Thread Frank Kingswood
On 17/10/10 19:26, hugo-l...@carfax.org.uk wrote: Change btrfs filesystem df to allow the user to control the scales used for sizes in the output. Index: btrfs-progs-unstable/btrfs.c === --- btrfs-progs-unstable.orig/btrfs.c

Re: the idea for improving the performance of b-tree search

2010-10-18 Thread Miao Xie
On Mon, 18 Oct 2010 10:41:41 +0800, Shaohua Li wrote: Hi Miao Chris, On Wed, Oct 13, 2010 at 05:00:56PM +0800, Miao Xie wrote: When I investigated the performance problem of file creation/deletion, I found btrfs spends lots of time in the b-tree search, so I consider whether we can use the

R: [patch 0/4] Size reporting of btrfs tool

2010-10-18 Thread kreij...@libero.it
Hi Hugo, please, remember to update the manpage also. Regards G.Baroncelli Messaggio originale Da: hugo-l...@carfax.org.uk Data: 17/10/2010 20.26 A: linux-btrfs@vger.kernel.org Ogg: [patch 0/4] Size reporting of btrfs tool While playing around with resizing volumes recently, I realised

newbie question about struct btrfs_dir_item *btrfs_match_dir_item_name

2010-10-18 Thread David Nicol
reading, in dir-item.c, the code in struct btrfs_dir_item *btrfs_match_dir_item_name (...) I am a little surprised to see an O(n) iterative name comparison check instead of something that would efficiently support directories with lots of items in them. Is this function a fall-back if a O(1) table

IOCTL #21 could also wait for btrfs_run_delayed_iputs

2010-10-18 Thread David Nicol
That's the other thing the cleaner_kthread does; conceivably some new delayed iputs could get queued during snapshot deletions. Thoughts? -- In one instance, a rai being transported by canoe was accidentally dropped and sunk to the sea floor. Although it was never seen again, everyone agreed

[RFC] Allow to exec btrfs subvolume delete by a non root user

2010-10-18 Thread Goffredo Baroncelli
Hi all like my previous patch, this one allow to remove a subvolume by an ordinary user. Instead of adding this capability to the rmdir(2) syscall, I update the BTRFS_IOC_SNAP_DESTROY ioctl, relaxing the rules to be execute. The checks are the ones performed by the rmdir(2) syscall. So a

Re: [PATCH 3/4] Btrfs: don't allocate chunks as aggressively

2010-10-18 Thread Josef Bacik
On Fri, Oct 15, 2010 at 05:28:34PM -0400, Josef Bacik wrote: Because the ENOSPC code over reserves super aggressively we end up allocating chunks way more often than we should. For example with my fs_mark tests on a 2gb fs I can end up reserved 1gb just for metadata, when only 34mb of that is

Re: [patch 2/4] Add an option to show ISO, binary or raw bytes counts using df.

2010-10-18 Thread Hugo Mills
On Mon, Oct 18, 2010 at 09:21:56AM +0100, Frank Kingswood wrote: On 17/10/10 19:26, hugo-l...@carfax.org.uk wrote: Change btrfs filesystem df to allow the user to control the scales used for sizes in the output. Index: btrfs-progs-unstable/btrfs.c

[PATCH] Btrfs: don't allocate chunks as aggressively V2

2010-10-18 Thread Josef Bacik
Because the ENOSPC code over reserves super aggressively we end up allocating chunks way more often than we should. For example with my fs_mark tests on a 2gb fs I can end up reserved 1gb just for metadata, when only 34mb of that is being used. So instead check to see if the amount of space