Re: WARNING: at fs/btrfs/free-space-cache.c:921 __btrfs_write_out_cache+0x6b9/0x9a0 [btrfs]()

2013-05-13 Thread Alexander Skwar
Hello Josef On Wed, May 8, 2013 at 10:47 PM, Josef Bacik jba...@fusionio.com wrote: On Wed, May 08, 2013 at 11:34:40AM -0600, Alexander Skwar wrote: Hello Josef Did you have a chance to look at that image? Did you find anything? Or should I simply create a new filesystem and forget about

[PATCH] Btrfs: remove useless copy in quota_ctl

2013-05-13 Thread Liu Bo
We don't need to copy it back to user side as it remains unchanged. Signed-off-by: Liu Bo bo.li@oracle.com --- fs/btrfs/ioctl.c |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 0de4a2f..c189189 100644 --- a/fs/btrfs/ioctl.c

[PATCH 0/3] Btrfs: some cleanups around btrfs_read_fs_root_no_name()

2013-05-13 Thread Stefan Behrens
Just some line deletions for callers of btrfs_read_fs_root_no_name(). They repeat the check for btrfs_root_refs() after calling btrfs_read_fs_root_no_name() and map the error to ENOENT in this case, and btrfs_read_fs_root_no_name() already does the same for you. send.c even checked the result for

[PATCH 2/3] Btrfs: cleanup, btrfs_read_fs_root_no_name() doesn't return NULL

2013-05-13 Thread Stefan Behrens
No need to check for NULL in send.c. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/send.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index ff40f1c..f075c82 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c

[PATCH 1/3] Btrfs: delete unused function

2013-05-13 Thread Stefan Behrens
Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/delayed-inode.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c index f26f38c..5615eac 100644 --- a/fs/btrfs/delayed-inode.c +++ b/fs/btrfs/delayed-inode.c

[PATCH 3/3] Btrfs: cleanup: don't check the same thing twice

2013-05-13 Thread Stefan Behrens
btrfs_read_fs_root_no_name() already checks if btrfs_root_refs() is zero and returns ENOENT in this case. There is no need to do it again in six places. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/export.c | 5 - fs/btrfs/file.c | 4 fs/btrfs/inode.c | 10

Remove a materially failed device from a Btrfs single-raid using partitions

2013-05-13 Thread Vincent
Hello, I am on Ubuntu Server 13.04 with Linux 3.8. I've created a single-raid using /dev/sd{a,b,c,d}{1,3}. One of my hard drives has failed, I mean it's materially dead. :~$ sudo btrfs filesystem show Label: none uuid: 40886f51-8c9b-4be1-8721-83bf5653d2a0 Total devices 5 FS bytes used

Re: Remove a materially failed device from a Btrfs single-raid using partitions

2013-05-13 Thread Harald Glatt
On Mon, May 13, 2013 at 4:15 PM, Vincent vinc...@influence-pc.fr wrote: Hello, I am on Ubuntu Server 13.04 with Linux 3.8. I've created a single-raid using /dev/sd{a,b,c,d}{1,3}. One of my hard drives has failed, I mean it's materially dead. :~$ sudo btrfs filesystem show Label: none

Re: Remove a materially failed device from a Btrfs single-raid using partitions

2013-05-13 Thread Vincent
Le 13/05/2013 16:29, Harald Glatt a écrit : On Mon, May 13, 2013 at 4:15 PM, Vincent vinc...@influence-pc.fr wrote: Hello, I am on Ubuntu Server 13.04 with Linux 3.8. I've created a single-raid using /dev/sd{a,b,c,d}{1,3}. One of my hard drives has failed, I mean it's materially dead. :~$

Re: Remove a materially failed device from a Btrfs single-raid using partitions

2013-05-13 Thread Harald Glatt
On Mon, May 13, 2013 at 4:33 PM, Vincent vinc...@influence-pc.fr wrote: Le 13/05/2013 16:29, Harald Glatt a écrit : On Mon, May 13, 2013 at 4:15 PM, Vincent vinc...@influence-pc.fr wrote: Hello, I am on Ubuntu Server 13.04 with Linux 3.8. I've created a single-raid using

[PATCH v2 2/3] Btrfs: cleanup, btrfs_read_fs_root_no_name() doesn't return NULL

2013-05-13 Thread Stefan Behrens
No need to check for NULL in send.c and disk-io.c. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- v1 - v2: One more place where the check for NULL can be deleted. fs/btrfs/disk-io.c | 2 -- fs/btrfs/send.c| 8 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff

[PATCH 1/5] Btrfs: don't abort the current transaction if there is no enough space for inode cache

2013-05-13 Thread Miao Xie
The filesystem with inode cache was forced to be read-only when we umounted it. Steps to reproduce: # mkfs.btrfs -f ${DEV} # mount -o inode_cache ${DEV} ${MNT} # dd if=/dev/zero of=${MNT}/file1 bs=1M count=8192 # btrfs fi syn ${MNT} # dd if=${MNT}/file1 of=/dev/null bs=1M # rm -f

[PATCH 4/5] Btrfs: don't steal the reserved space from the global reserve if their space type is different

2013-05-13 Thread Miao Xie
If the type of the space we need is different with the global reserve, we can not steal the space from the global reserve, because we can not allocate the space from the free space cache that the global reserve points to. Cc: Tsutomu Itoh t-i...@jp.fujitsu.com Signed-off-by: Miao Xie

[PATCH 2/5] Btrfs: don't use global block reservation for inode cache truncation

2013-05-13 Thread Miao Xie
It is very likely that there are lots of subvolumes/snapshots in the filesystem, so if we use global block reservation to do inode cache truncation, we may hog all the free space that is reserved in global rsv. So it is better that we do the free space reservation for inode cache truncation by

[PATCH 5/5] Btrfs: update the global reserve if it is empty

2013-05-13 Thread Miao Xie
Before applying this patch, we reserved the space for the global reserve by the minimum unit if we found it is empty, it was unreasonable and inefficient, because if the global reserve space was depleted, it implied that the size of the global reserve was too small. In this case, we shoud update

Re: [PATCH 0/0] libbtrfs: Set SONAME to libbtrfs.so.0 (instead of libbtrfs.so)

2013-05-13 Thread David Sterba
On Sun, May 12, 2013 at 04:33:43PM +0100, Richard W.M. Jones wrote: In the original version of btrfs-progs: libify some parts of btrfs-progs by Mark Fasheh, the soname field of the internal libbtrfs library was set to libbtrfs.so.1. This doesn't match the filename of the library

[PATCH] btrfs-progs: update manpage to add filesystem show command in synopsis

2013-05-13 Thread Eryu Guan
filesystem show was missing in SYNOPSIS section. Signed-off-by: Eryu Guan guane...@gmail.com --- man/btrfs.8.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/man/btrfs.8.in b/man/btrfs.8.in index 94f4ffe..6603cad 100644 --- a/man/btrfs.8.in +++ b/man/btrfs.8.in @@ -31,6 +31,8 @@ btrfs \-

[PATCH 3/5] Btrfs: optimize the error handle of use_block_rsv()

2013-05-13 Thread Miao Xie
cc: Tsutomu Itoh t-i...@jp.fujitsu.com Signed-off-by: Miao Xie mi...@cn.fujitsu.com --- fs/btrfs/extent-tree.c | 65 ++ 1 file changed, 28 insertions(+), 37 deletions(-) diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index

Re: Remove a materially failed device from a Btrfs single-raid using partitions

2013-05-13 Thread Vincent
Shit, I've followed the official documentation https://btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices#Replacing_failed_devices With, as explain: mkfs.btrfs -d single /dev/sda3 /dev/sdb1 /dev/sdc1 /dev/sdd1 mount -o degraded /dev/sda3 /media/single-raid/ btrfs device delete

Re: [PATCH] Btrfs-progs: add dedup register

2013-05-13 Thread David Sterba
On Thu, May 02, 2013 at 12:27:39AM +0800, Liu Bo wrote: +static int cmd_dedup(int argc, char **argv) +{ + int fd, res, e; + char*path; + + if (check_argc_exact(argc, 2)) + usage(cmd_dedup_usage); + + path = argv[1]; + + fd =

Re: [PATCH] Btrfs: add ioctl to wait for qgroup rescan completion

2013-05-13 Thread David Sterba
On Tue, May 07, 2013 at 08:17:12AM +0200, Jan Schmidt wrote: On Mon, May 06, 2013 at 23:20 (+0200), David Sterba wrote: On Mon, May 06, 2013 at 09:14:17PM +0200, Jan Schmidt wrote: --- a/include/uapi/linux/btrfs.h +++ b/include/uapi/linux/btrfs.h @@ -530,6 +530,7 @@ struct

Re: Remove a materially failed device from a Btrfs single-raid using partitions

2013-05-13 Thread Chris Murphy
On May 13, 2013, at 9:30 AM, Vincent vinc...@influence-pc.fr wrote: Shit, I've followed the official documentation https://btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices#Replacing_failed_devices With, as explain: mkfs.btrfs -d single /dev/sda3 /dev/sdb1 /dev/sdc1

Re: [PATCH] Btrfs-progs: add dedup register

2013-05-13 Thread Liu Bo
On Mon, May 13, 2013 at 05:55:10PM +0200, David Sterba wrote: On Thu, May 02, 2013 at 12:27:39AM +0800, Liu Bo wrote: +static int cmd_dedup(int argc, char **argv) +{ + int fd, res, e; + char*path; + + if (check_argc_exact(argc, 2)) + usage(cmd_dedup_usage);

[PATCH v2 10/12] VFS hot tracking, btrfs: add hot tracking support

2013-05-13 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com Introduce one new mount option '-o hot_track', and add its parsing support. Its usage looks like: mount -o hot_track mount -o nouser,hot_track mount -o nouser,hot_track,loop mount -o hot_track,nouser Reviewed-by: David Sterba

[PATCH v2 11/12] VFS hot tracking: add documentation

2013-05-13 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com Add Documentation for VFS hot tracking feature Signed-off-by: Chandra Seetharaman sekha...@us.ibm.com Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com --- Documentation/filesystems/00-INDEX | 2 +

[PATCH v2 12/12] VFS hot tracking: add fs hot type support

2013-05-13 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com Introduce one ability to enable that specific FS can register its own hot tracking functions. Signed-off-by: Chandra Seetharaman sekha...@us.ibm.com Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com --- fs/hot_tracking.c| 32

[PATCH v2 00/12] VFS hot tracking

2013-05-13 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com The patchset is trying to introduce hot tracking function in VFS layer, which will keep track of real disk I/O in memory. By it, you will easily know more details about disk I/O, and then detect where disk I/O hot spots are. Also, specific FS can take

[PATCH v2 01/12] VFS hot tracking: introduce some data structures

2013-05-13 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 radix tree 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

[PATCH v2 02/12] VFS hot tracking: add i/o freq tracking hooks

2013-05-13 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com Add i/o freq tracking hooks in real read/write code paths which include read_pages(), do_writepages(), do_generic_file_read(), and __blockdev_direct_IO(). Currently whole FS has one RB tree to track i/o freqs for all inodes which had real disk i/o,

[PATCH v2 03/12] VFS hot tracking: add one workqueue to update hot map

2013-05-13 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com Add a workqueue per superblock and a delayed_work to run periodic work to update map info on each superblock. Two arrays of map list are defined, one is for hot inode items, and the other is for hot extent items. The hot items in the RB-tree will

[PATCH v2 05/12] VFS hot tracking, rcu: introduce one rcu macro for list

2013-05-13 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com This rcu macro for list will be used in seq_list rcu interfaces. Signed-off-by: Chandra Seetharaman sekha...@us.ibm.com Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com --- include/linux/rculist.h | 5 + 1 file changed, 5 insertions(+) diff

[PATCH v2 06/12] VFS hot tracking, seq_file: introduce one set of rcu seq_list interfaces

2013-05-13 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com The patch will introduce one set of rcu interface for seq_list. Signed-off-by: Chandra Seetharaman sekha...@us.ibm.com Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com --- fs/seq_file.c| 37 +

[PATCH v2 07/12] VFS hot tracking: add debugfs support

2013-05-13 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com Add a directory 'dev_name' in /sys/kernel/debug/hot_track/ for each volume that contains four files which are 'inode_stat', 'extent_stat', 'inode_spot', and 'extent_spot'. Signed-off-by: Chandra Seetharaman sekha...@us.ibm.com Signed-off-by: Zhi Yong

[PATCH v2 08/12] VFS hot tracking: add one ioctl interface

2013-05-13 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 hot_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

[PATCH v2 09/12] VFS hot tracking, procfs: add two proc interfaces

2013-05-13 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com Add two proc interfaces hot-age-interval and hot-update-interval under the dir /proc/sys/fs/ in order to turn HOT_AGE_INTERVAL and HOT_UPDATE_INTERVAL into be tunable. Signed-off-by: Chandra Seetharaman sekha...@us.ibm.com Signed-off-by: Zhi Yong Wu

[PATCH v2 04/12] VFS hot tracking: register one shrinker

2013-05-13 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com Register a shrinker to control the amount of memory that is used in tracking hot regions. If we are throwing inodes out of memory due to memory pressure, we most definitely are going to need to reduce the amount of memory the tracking code is using,

[PATCH] Btrfs: return errno if possible when we fail to allocate memory

2013-05-13 Thread Liu Bo
We need to set return value explicitly, otherwise we'll lose the error value. Signed-off-by: Liu Bo bo.li@oracle.com --- fs/btrfs/inode.c |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 1669c3b..99a9c25 100644 ---

mentor

2013-05-13 Thread Balbir Choudary
Hi,   Please if anyone can provide project idea or mentor ship for my college work on btrfs. I have C programming experience and some linux filesystem understanding.     thanks.   Balbir -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to