Re: [PATCH] [RFC] Add btrfs autosnap feature

2012-03-05 Thread Anand Jain
Prior to making a new snapshot, grab the (stored) transid of the previous snapshot, and check if any files have been modified in the source since that transid: btrfs sub find ${source} ${previous_transid}. If nothing is returned, then you don't have to bother making the snapshot at all,

Re: [PATCH] [RFC] Add btrfs autosnap feature

2012-03-05 Thread cwillu
 ---  sync; read current tran-id and compare  (new tgw occurs)  snapshot  new tgw  occurs  sync; read current tran-id again and store  ---  which will result in failing to take snapshot even if there are changes. btrfs sub find-new /snapshot- -1 shows the transid of the latest change

Re: getdents - ext4 vs btrfs performance

2012-03-05 Thread Jacek Luczak
2012/3/4 Jacek Luczak difrost.ker...@gmail.com: 2012/3/3 Jacek Luczak difrost.ker...@gmail.com: 2012/3/2 Chris Mason chris.ma...@oracle.com: On Fri, Mar 02, 2012 at 03:16:12PM +0100, Jacek Luczak wrote: 2012/3/2 Chris Mason chris.ma...@oracle.com: On Fri, Mar 02, 2012 at 11:05:56AM +0100,

Re: getdents - ext4 vs btrfs performance

2012-03-05 Thread Jan Kara
On Fri 02-03-12 14:32:15, Ted Tso wrote: On Fri, Mar 02, 2012 at 09:26:51AM -0500, Chris Mason wrote: It would be interesting to have a project where someone added fallocate() support into libelf, and then added some hueristics into ext4 so that if a file is fallocated to a precise size, or if

[PATCH 17/19] btrfs: Convert to new freezing mechanism

2012-03-05 Thread Jan Kara
We convert btrfs_file_aio_write() to use new freeze check. We also add proper freeze protection to btrfs_page_mkwrite(). Checks in cleaner_kthread() and transaction_kthread() can be safely removed since btrfs_freeze() will lock the mutexes and thus block the threads (and they shouldn't have

[PATCH 00/19] Fix filesystem freezing deadlocks

2012-03-05 Thread Jan Kara
Hallelujah, after a couple of weeks and several rewrites, here comes the third iteration of my patches to improve filesystem freezing. Filesystem freezing is currently racy and thus we can end up with dirty data on frozen filesystem (see changelog patch 06 for detailed race description).

[PATCH 04/19] btrfs: Push mnt_want_write() outside of i_mutex

2012-03-05 Thread Jan Kara
When mnt_want_write() starts to handle freezing it will get a full lock semantics requiring proper lock ordering. So push mnt_want_write() call consistently outside of i_mutex. CC: Chris Mason chris.ma...@oracle.com CC: linux-btrfs@vger.kernel.org Signed-off-by: Jan Kara j...@suse.cz ---

Re: getdents - ext4 vs btrfs performance

2012-03-05 Thread Chris Mason
On Mon, Mar 05, 2012 at 12:32:45PM +0100, Jacek Luczak wrote: 2012/3/4 Jacek Luczak difrost.ker...@gmail.com: 2012/3/3 Jacek Luczak difrost.ker...@gmail.com: 2012/3/2 Chris Mason chris.ma...@oracle.com: On Fri, Mar 02, 2012 at 03:16:12PM +0100, Jacek Luczak wrote: 2012/3/2 Chris Mason

Understanding metadata efficiency of btrfs

2012-03-05 Thread Kai Ren
I've run a little wired benchmark on comparing Btrfs v0.19 and XFS: There are 2000 directories and each directory contains 1000 files. The workload randomly stat a file or chmod a file for 200 times. And the number of stat and chmod are 50% and 50%. I monitor the number of disk read requests

Re: Understanding metadata efficiency of btrfs

2012-03-05 Thread Duncan
Kai Ren posted on Mon, 05 Mar 2012 21:16:34 -0500 as excerpted: I've run a little wired benchmark on comparing Btrfs v0.19 and XFS: [snip description of test] I monitor the number of disk read requests #WriteRq #ReadRq #WriteSect #ReadSect Btrfs 2403520 157118329249216

[PATCH 1/2] Make find_updated_files to return value instead of printing

2012-03-05 Thread Anand jain
From: Anand Jain anand.j...@oracle.com This patch made the function find_updated_files to update the transid in a pointer instead of printing it on the stdout. This is needed by the autosnap and anyother program which may want to find the current transid. Note that when last_gen 3rd parameter is

[PATCH 2/2] Use transaction id to determin if there is any change in the subvol

2012-03-05 Thread Anand jain
From: Anand Jain anand.j...@oracle.com Moved from hash method of determining the FS changes to the transaction record id method Signed-off-by: Anand Jain anand.j...@oracle.com --- autosnap.c | 106 ++-- autosnap.h |4 +-- 2 files