Re: [PATCH V3 1/2] Btrfs: cleanup duplicated division functions

2012-09-23 Thread Miao Xie
On Fri, 21 Sep 2012 17:24:44 +0200, David Sterba wrote: On Fri, Sep 21, 2012 at 05:07:46PM +0800, Miao Xie wrote: --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -3335,6 +3335,24 @@ static long btrfs_ioctl_balance(struct file *file, void __user *arg) goto

Re: [PATCH 2/5] Btrfs: fix trans block rsv regression

2012-09-23 Thread Miao Xie
On fri, 14 Sep 2012 21:05:01 +0800, Liu Bo wrote: On 09/14/2012 09:01 PM, Liu Bo wrote: On 09/14/2012 08:41 PM, Josef Bacik wrote: On Fri, Sep 14, 2012 at 02:58:04AM -0600, Liu Bo wrote: In some workloads we have nested joining transaction operations, eg. run_delalloc_nocow

Re: [PATCH V3 1/2] Btrfs: cleanup duplicated division functions

2012-09-23 Thread Ilya Dryomov
On Fri, Sep 21, 2012 at 05:07:46PM +0800, Miao Xie wrote: div_factor{_fine} has been implemented for two times, and these two functions are very similar, so cleanup the reduplicate implement and drop the original div_factor(), and then rename div_factor_fine() to div_factor(). So the divisor

[RFC v2 00/10] vfs: hot data tracking

2012-09-23 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com NOTE: The patchset is currently post out mainly to make sure it is going in the correct direction and hope to get some helpful comments from other guys. For more infomation, please check hot_tracking.txt in Documentation TODO List: 1.) Need to do

[RFC v2 01/10] vfs: introduce private rb structures

2012-09-23 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com One root structure hot_info is defined, is hooked up in super_block, and will be used to hold rb trees root, hash list root and some other information, etc. Adds hot_inode_tree struct to keep track of frequently accessed files, and be keyed by

[RFC v2 08/10] vfs: add 3 new ioctl interfaces

2012-09-23 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com FS_IOC_GET_HEAT_INFO: return a struct containing the various metrics collected in btrfs_freq_data structs, and also return a calculated data temperature based on those metrics. Optionally, retrieve the temperature from the hot data hash list instead of

[RFC v2 07/10] vfs: fork one kthread to update data temperature

2012-09-23 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com Fork and run one kernel kthread to calculate that temperature based on some metrics kept in custom frequency data structs, and store the info in the hash table. Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com --- fs/hot_tracking.c|

[RFC v2 09/10] vfs: add debugfs support

2012-09-23 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com Add a /sys/kernel/debug/hot_track/device_name/ directory for each volume that contains two files. The first, `inode_data', contains the heat information for inodes that have been brought into the hot data map structures. The second, `range_data',

[RFC v2 06/10] vfs: enable hot data tracking

2012-09-23 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com Miscellaneous features that implement hot data tracking and generally make the hot data functions a bit more friendly. Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com --- fs/direct-io.c | 10 ++

[RFC v2 05/10] vfs: introduce one hash table

2012-09-23 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com Adds a hash table structure which contains a lot of hash list and is used to efficiently look up the data temperature of a file or its ranges. In each hash list of hash table, the hash node will keep track of temperature info. Signed-off-by: Zhi

[RFC v2 03/10] vfs: add one new mount option '-o hottrack'

2012-09-23 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com Introduce one new mount option '-o hottrack', and add its parsing support. Its usage looks like: mount -o hottrack mount -o nouser,hottrack mount -o nouser,hottrack,loop mount -o hottrack,nouser Signed-off-by: Zhi Yong Wu

[RFC v2 04/10] vfs: add init and exit support

2012-09-23 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com Add initialization function to create some key data structures when hot tracking is enabled; Clean up them when hot tracking is disabled Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com --- fs/hot_tracking.c | 60

[RFC v2 10/10] vfs: add documentation

2012-09-23 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com --- Documentation/filesystems/hot_tracking.txt | 106 1 files changed, 106 insertions(+), 0 deletions(-) create mode 100644 Documentation/filesystems/hot_tracking.txt

Re: crash in read_extent_buffer+0xb7/0xfb

2012-09-23 Thread Marc MERLIN
On Thu, Sep 20, 2012 at 08:46:52PM -0700, Marc MERLIN wrote: On Thu, Sep 20, 2012 at 10:17:47AM -0700, Marc MERLIN wrote: I had a btrfs built on top of 5 drives (dmcrypt devices). The drive then died while I was writing to the filesystem and my system crashed and rebooted:

[PATCH 1/4] Btrfs: cleanup: return the ret value of __btrfs_end_transaction directly in btrfs_end_transaction_

2012-09-23 Thread Wang Sheng-Hui
No need to use specific var to record the return value of __btrfs_end_transaction and check if it is not zero. Just return the result directly as btrfs_end_transaction_dmeta. Signed-off-by: Wang Sheng-Hui shh...@gmail.com --- fs/btrfs/transaction.c | 21 +++-- 1 files changed,

[PATCH 2/4] Btrfs: trivial cleanup: setup ret with 0 directly in btrfs_wait_for_commit

2012-09-23 Thread Wang Sheng-Hui
trivial code cleanup. Signed-off-by: Wang Sheng-Hui shh...@gmail.com --- fs/btrfs/transaction.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 8fcc501..469a8b6 100644 --- a/fs/btrfs/transaction.c +++

[PATCH 3/4] Btrfs: remove unnecessary cur_trans set before goto loop in join_transaction

2012-09-23 Thread Wang Sheng-Hui
In the big loop, cur_trans will be set fs_info-running_transaction before it's used. And after kmem_cache_free it and goto loop, it will be setup again. No need to setup it immediately after freed. Signed-off-by: Wang Sheng-Hui shh...@gmail.com --- fs/btrfs/transaction.c |1 - 1 files

[PATCH 4/4] Btrfs: tivial cleanup: add space between = and the rest code

2012-09-23 Thread Wang Sheng-Hui
trivial code cleanup. Signed-off-by: Wang Sheng-Hui shh...@gmail.com --- fs/btrfs/transaction.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 675d813..3279df2 100644 --- a/fs/btrfs/transaction.c +++

Re: [PATCH V3 1/2] Btrfs: cleanup duplicated division functions

2012-09-23 Thread Miao Xie
On Sun, 23 Sep 2012 14:49:24 +0300, Ilya Dryomov wrote: diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 9384a2a..d8d53f7 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -3335,6 +3335,24 @@ static long btrfs_ioctl_balance(struct file *file, void __user *arg)

[PATCH v2] Btrfs-progs: btrfs subvolume delete could delete subvolumes

2012-09-23 Thread Anand jain
From: Anand Jain anand.j...@oracle.com Signed-off-by: Anand Jain anand.j...@oracle.com --- cmds-subvolume.c | 36 1 files changed, 24 insertions(+), 12 deletions(-) diff --git a/cmds-subvolume.c b/cmds-subvolume.c index f4aa80f..f6c488e 100644 ---

Re: [PATCH] Btrfs-progs: btrfs subvolume delete could delete subvolumes

2012-09-23 Thread Anand Jain
David, Thanks for the comments. Yes, this is useful, thanks. I'm thinking if it's ok to stop on first error, ie. when the subvolume does not exist or is a directory. I am fine with either ways. I shall just keep it as it is as of now. -Anand -- To unsubscribe from this list: send the

Btrfs: check range early in map_private_extent_buffer

2012-09-23 Thread Wang Sheng-Hui
Check range early to avoid further check/compute in case of range error. Signed-off-by: Wang Sheng-Hui shh...@gmail.com --- fs/btrfs/extent_io.c | 16 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index