Re: [PATCH] Btrfs/send: sparse and pre-allocated file support for, btrfs-send mechanism

2013-01-24 Thread Alex Lyakas
Hi Chen, with all due respect, what do you mean by I see and OK for users? The semantics of the fallocate API with/without the FALLOC_FL_PUNCH_HOLE flag is not defined by me or you. As far as I understand, the file system *must* adhere to the semantics of this API, as defined elsewhere. Looking,

Warnings on file removal after Quota exceeded error (EDQUOT)

2013-01-24 Thread Lev Vainblat
Hi all, I executed the following simple sequence of commands: # mount /dev/sda /mnt/btrfs # btrfs quota enable /mnt/btrfs/ # btrfs subvolume create /mnt/btrfs/SV Create subvolume '/mnt/btrfs/SV' # btrfs qgroup limit 1m /mnt/btrfs/SV # dd if=/dev/zero of=/mnt/btrfs/SV/file bs=64x1024 dd: writing

[PATCH] Btrfs-progs: we need to have the string null terminated

2013-01-24 Thread Anand Jain
Bug: - btrfs subvolume list / -a ID 258 gen 4226 top level 384 path media/smbshare :: btrfs subvolume list /home -a ID 258 gen 4226 top level 5 path FS_TREE/__active/media/smbshare4.snap In the first command's output, this path is printed correctly, however in the second output it has

Re: inconsistent output on sub list

2013-01-24 Thread Anand Jain
Brendan, --- [root@watricky mnt]# btrfs subvolume list / -a ID 258 gen 4226 top level 384 path media/smbshare :: [root@watricky mnt]# btrfs subvolume list /home -a ID 258 gen 4226 top level 5 path FS_TREE/__active/media/smbshare4.snap --- This is definitely a bug. Thanks

Re: Open for contribution towards Btrfs testing

2013-01-24 Thread Arne Jansen
Hi, On 24.01.2013 06:10, praneeth u wrote: Hello, We are team of 5 students, interns at Green turtles technologies, interested in contributing to btrfs. Any space for contribution in btrfs testing ? we will be updating pogress twice in a week. Need suggestions on how to proceed. The quota

Re: Warnings on file removal after Quota exceeded error (EDQUOT)

2013-01-24 Thread Arne Jansen
On 24.01.2013 10:39, Lev Vainblat wrote: Hi all, I executed the following simple sequence of commands: # mount /dev/sda /mnt/btrfs # btrfs quota enable /mnt/btrfs/ # btrfs subvolume create /mnt/btrfs/SV Create subvolume '/mnt/btrfs/SV' # btrfs qgroup limit 1m /mnt/btrfs/SV # dd

Re: [PATCH] Btrfs/send: sparse and pre-allocated file support for, btrfs-send mechanism

2013-01-24 Thread Miao Xie
On thu, 24 Jan 2013 10:53:17 +0200, Alex Lyakas wrote: Hi Chen, with all due respect, what do you mean by I see and OK for users? The semantics of the fallocate API with/without the FALLOC_FL_PUNCH_HOLE flag is not defined by me or you. As far as I understand, the file system *must* adhere to

[PATCH] Btrfs-prog/send: fix wrong best-parent assignment in, find_good_parent()

2013-01-24 Thread Chen Yang
We use find_good_parent() to look for a suit snapshot in the clone source snapshots as the parent, not the source subvolume of the snapshot which is about to be sent. fix it Signed-off-by: Cheng Yang chenyang.f...@cn.fujitsu.com --- cmds-send.c |2 +- 1 files changed, 1 insertions(+), 1

Re: [PATCH] Btrfs/send: sparse and pre-allocated file support for, btrfs-send mechanism

2013-01-24 Thread Hugo Mills
On Thu, Jan 24, 2013 at 07:39:17PM +0800, Miao Xie wrote: On thu, 24 Jan 2013 10:53:17 +0200, Alex Lyakas wrote: Hi Chen, with all due respect, what do you mean by I see and OK for users? The semantics of the fallocate API with/without the FALLOC_FL_PUNCH_HOLE flag is not defined by me or

Re: [PATCH] Btrfs/send: sparse and pre-allocated file support for, btrfs-send mechanism

2013-01-24 Thread Miao Xie
On thu, 24 Jan 2013 11:58:13 +, Hugo Mills wrote: On Thu, Jan 24, 2013 at 07:39:17PM +0800, Miao Xie wrote: On thu, 24 Jan 2013 10:53:17 +0200, Alex Lyakas wrote: Hi Chen, with all due respect, what do you mean by I see and OK for users? The semantics of the fallocate API

Re: [PATCH] Btrfs/send: sparse and pre-allocated file support for, btrfs-send mechanism

2013-01-24 Thread Hugo Mills
On Thu, Jan 24, 2013 at 08:13:34PM +0800, Miao Xie wrote: Onthu, 24 Jan 2013 11:58:13 +, Hugo Mills wrote: On Thu, Jan 24, 2013 at 07:39:17PM +0800, Miao Xie wrote: On thu, 24 Jan 2013 10:53:17 +0200, Alex Lyakas wrote: Hi Chen, with all due respect, what do you mean by I see and

Re: unmountable filesystem with kernel 3.7.3

2013-01-24 Thread F. Frederich
Am 24.01.2013 01:57, schrieb Liu Bo: On Wed, Jan 23, 2013 at 08:14:44PM +0100, F. Frederich wrote: Hi, os: Gentoo kernel: 3.7.3 from kernel.org 2 harddisks with btrfs and Raid1, lzo compression trying to start a virtual machine (qemu-kvm) the system crashed giving following messages: kernel:

Re: Quota reached: can't delete

2013-01-24 Thread Arne Jansen
On 24.01.2013 16:12, Jerome M wrote: Hi, With the current btrfs quota implementation, when you reach a subvolume quota limit, you can't delete anything without first removing the limit or enlarge it: rm: cannot remove `testfile.bin': Disk quota exceeded Is there any plan to change

Re: [PATCH] btrfs: fix potential null pointer dereference bug

2013-01-24 Thread Josef Bacik
On Sat, Jan 19, 2013 at 08:27:45AM -0700, Cong Ding wrote: The bug happens when rb_node == NULL. It causes variable node to be NULL and then the NULL pointer is dereferenced this line: BUG_ON((struct btrfs_root *)node-data != root); Based on my analysis, function tree_search should not

Re: [PATCH 1/2] V2 Avoid sending disknr==0 extents when possible.

2013-01-24 Thread Josef Bacik
On Mon, Jan 21, 2013 at 03:27:22AM -0700, Alex Lyakas wrote: In the following cases we do not send disknr==0 extents: 1) full send 2) new inode in a diff-send 3) when disknr==0 extents are added to the end of an inode Original-version-by: Chen Yang chenyang.f...@cn.fujitsu.com

[PATCH] Btrfs-progs: Fix minor problems with btrfslabel.c

2013-01-24 Thread Gene Czarcinski
Fixed indentation, replace spaces with tabs. Signed-off-by: Danny Kukawka danny.kuka...@bisect.de Rebased, also fixed compiler warnings Signed-off-by: Gene Czarcinski g...@czarc.net --- btrfslabel.c | 57 + 1 file changed, 29 insertions(+),

Re: [PATCH 1/5] Btrfs: fix repeated delalloc work allocation

2013-01-24 Thread Alex Lyakas
Hi Miao, On Thu, Jan 24, 2013 at 4:14 AM, Miao Xie mi...@cn.fujitsu.com wrote: On wed, 23 Jan 2013 19:02:30 +0200, Alex Lyakas wrote: Hi Miao, I have tested your patch, and the two discussed issues (OOM and handling the same inode more than once) are solved with it. However, snap creation

btrfs-undelete shell-script

2013-01-24 Thread Jörg Walter
Hi, I tried to recover an accidentally deleted text file from a btrfs volume using the trusty old 'grep --text -C 500' method and failed, since the filesystem was compressed. So I wrote a shell script that uses btrfs-progs for a proper undelete functionality. Attached is the script that

Re: BUG in btrfs_set_item_key_safe

2013-01-24 Thread David Sterba
Hi, On Fri, Oct 26, 2012 at 08:35:43AM +0200, Jan Schmidt wrote: while running extensive qgroup and tree mod log tests I got to the following BUG, which is probably not related to tree mod log: I've left the fsx DIO tester overnight, after Josef identified the fix for the csum mismatch bug,

Re: [PATCH 2/2] Btrfs: fix memory leak on extent map after fsync

2013-01-24 Thread Josef Bacik
On Tue, Jan 08, 2013 at 07:49:21AM -0700, Liu Bo wrote: During fsync, we put the changed parts(i.e. extent map) into the log tree, and we ship these parts from a list of modified_extents to a local list to process, of course, we must increment the refs of the extent maps to avoid it from

Re: [PATCH 2/2] Btrfs: fix memory leak on extent map after fsync

2013-01-24 Thread Josef Bacik
On Tue, Jan 08, 2013 at 07:49:21AM -0700, Liu Bo wrote: During fsync, we put the changed parts(i.e. extent map) into the log tree, and we ship these parts from a list of modified_extents to a local list to process, of course, we must increment the refs of the extent maps to avoid it from

Re: [PATCH] Btrfs-prog/send: fix wrong best-parent assignment in, find_good_parent()

2013-01-24 Thread Jan Schmidt
On Thu, January 24, 2013 at 12:53 (+0100), Chen Yang wrote: We use find_good_parent() to look for a suit snapshot in the clone source snapshots as the parent, not the source subvolume of the snapshot which is about to be sent. fix it Signed-off-by: Cheng Yang chenyang.f...@cn.fujitsu.com

Re: [PATCH] Btrfs/send: sparse and pre-allocated file support for, btrfs-send mechanism

2013-01-24 Thread Jan Schmidt
Hi Alex, On Thu, January 24, 2013 at 09:53 (+0100), Alex Lyakas wrote: Looking, for example, here: http://man7.org/linux/man-pages/man2/fallocate.2.html Allocating disk space The default operation (i.e., mode is zero) of fallocate() allocates and initializes to zero the disk space within

Re: [PATCH] Btrfs: put csums on the right ordered extent

2013-01-24 Thread David Sterba
On Wed, Jan 23, 2013 at 06:57:09PM -0500, Chris Mason wrote: Looks like Josef saw the same, so we have two different bugs (missing crcs vs incorrect crcs). Josef mentioned a much faster test for the incorrect crcs...Josef what was that test? Yeah, 2 bugs, this patch fixed the incorrect csums

Re: [PATCH 01/10] Btrfs-progs: move open_file_or_dir() to utils.c

2013-01-24 Thread Goffredo Baroncelli
On 01/24/2013 10:23 AM, Stefan Behrens wrote: On Wed, 23 Jan 2013 22:39:29 -0600, Eric Sandeen wrote: instead of renaming keeping the btrfsctl.c copy There is a new momentum to improve the Btrfs-progs quality :) IMO, one step is to get rid of the legacy tools and sources. It wastes time to

Re: [PATCH] Btrfs/send: sparse and pre-allocated file support for, btrfs-send mechanism

2013-01-24 Thread Alex Lyakas
Hi Jan, On Thu, Jan 24, 2013 at 7:13 PM, Jan Schmidt list.bt...@jan-o-sch.net wrote: Hi Alex, On Thu, January 24, 2013 at 09:53 (+0100), Alex Lyakas wrote: Looking, for example, here: http://man7.org/linux/man-pages/man2/fallocate.2.html Allocating disk space The default operation (i.e.,

Re: [PATCH 00/13] Btrfs-progs: more patches for integration (integration-20130121)

2013-01-24 Thread David Sterba
On Tue, Jan 22, 2013 at 03:14:35PM -0500, Gene Czarcinski wrote: On 01/21/2013 01:40 PM, David Sterba wrote: On Sun, Jan 20, 2013 at 04:04:05PM -0500, Gene Czarcinski wrote: I have done some additional scraping of the mailing list to identify some low hanging fruit which I consider should be

Please revert 2794ed0 (fix permissions of empty files not affected by umask)

2013-01-24 Thread Filipe Brandenburger
Hi, Please revert commit 2794ed013b3551cbae887ea1b93c52aaacb7370d. That patch was meant to be added to btrfs_create and not to btrfs_mknod. (It was indeed later added to btrfs_create on commit 9185aa587b7425f8f4520da2e66792f5f3c2b815, so that's already OK.) btrfs_mknod already has a call to

Re: Please revert 2794ed0 (fix permissions of empty files not affected by umask)

2013-01-24 Thread Josef Bacik
On Thu, Jan 24, 2013 at 11:32:17AM -0700, Filipe Brandenburger wrote: Hi, Please revert commit 2794ed013b3551cbae887ea1b93c52aaacb7370d. That patch was meant to be added to btrfs_create and not to btrfs_mknod. (It was indeed later added to btrfs_create on commit

Re: [PATCH 10/10] Btrfs-progs: add show subcommand to subvol cli

2013-01-24 Thread Zach Brown
+ if (sv_id == 5) { + printf(%s is btrfs root\n, fullpath); + close(fd); + close(mntfd); + free(mnt); + free(fullpath); + return 1; Just wondering, at this point might a goto out; be cleaner error handling? Every

Re: [PATCH 01/10] Btrfs-progs: move open_file_or_dir() to utils.c

2013-01-24 Thread Eric Sandeen
On 1/24/13 11:57 AM, Goffredo Baroncelli wrote: On 01/24/2013 10:23 AM, Stefan Behrens wrote: On Wed, 23 Jan 2013 22:39:29 -0600, Eric Sandeen wrote: instead of renaming keeping the btrfsctl.c copy There is a new momentum to improve the Btrfs-progs quality :) IMO, one step is to get rid of

Re: [PATCH 00/10] add show sub-command for btrfs subvol cli

2013-01-24 Thread Gene Czarcinski
On 01/23/2013 03:12 AM, Anand Jain wrote: Please accept this patch set which is on top of git://repo.or.cz/btrfs-progs-unstable/devel.git for-chris to add 'show' sub-command feature for the btrfs subvol cli as in an example below.. OK, in spite of saying that these patches did not apply

Re: [PATCH 00/13] Btrfs-progs: more patches for integration (integration-20130121)

2013-01-24 Thread Gene Czarcinski
On 01/24/2013 01:13 PM, David Sterba wrote: On Tue, Jan 22, 2013 at 03:14:35PM -0500, Gene Czarcinski wrote: On 01/21/2013 01:40 PM, David Sterba wrote: On Sun, Jan 20, 2013 at 04:04:05PM -0500, Gene Czarcinski wrote: I have done some additional scraping of the mailing list to identify some

Re: [GIT PULL] Btrfs fixes

2013-01-24 Thread Chris Mason
On Tue, Jan 22, 2013 at 05:48:33PM -0700, Chris Mason wrote: Hi Linus, My for-linus branch has our batch of btrfs fixes: git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus We've been hammering away at a crc corruption as well, which I was really hoping to get

Re: [PATCH 01/10] Btrfs-progs: move open_file_or_dir() to utils.c

2013-01-24 Thread Goffredo Baroncelli
On 01/24/2013 08:42 PM, Eric Sandeen wrote: On 1/24/13 11:57 AM, Goffredo Baroncelli wrote: On 01/24/2013 10:23 AM, Stefan Behrens wrote: On Wed, 23 Jan 2013 22:39:29 -0600, Eric Sandeen wrote: instead of renaming keeping the btrfsctl.c copy There is a new momentum to improve the

Re: [PATCH 01/10] Btrfs-progs: move open_file_or_dir() to utils.c

2013-01-24 Thread Chris Mason
On Thu, Jan 24, 2013 at 03:09:53PM -0700, Goffredo Baroncelli wrote: On 01/24/2013 08:42 PM, Eric Sandeen wrote: On 1/24/13 11:57 AM, Goffredo Baroncelli wrote: On 01/24/2013 10:23 AM, Stefan Behrens wrote: On Wed, 23 Jan 2013 22:39:29 -0600, Eric Sandeen wrote: instead of renaming

Re: [PATCH 01/10] Btrfs-progs: move open_file_or_dir() to utils.c

2013-01-24 Thread David Sterba
On Thu, Jan 24, 2013 at 05:36:52PM -0500, Chris Mason wrote: On Thu, Jan 24, 2013 at 03:09:53PM -0700, Goffredo Baroncelli wrote: The same is true for the debian package, but are these used in Fedora ? For backwards compat, could those be turned into shell scripts which invoke the btrfs

Re: [PATCH 01/10] Btrfs-progs: move open_file_or_dir() to utils.c

2013-01-24 Thread Avi Miller
Hey Chris, On 25/01/2013, at 9:36 AM, Chris Mason chris.ma...@fusionio.com wrote: I'd say that if SuSE or oracle depend on them we keep them. Otherwise, I'm fine with removing them or just making the 3 line bash script. You can take this as an official response from Oracle: we don't

Re: [PATCH 10/10] Btrfs-progs: add show subcommand to subvol cli

2013-01-24 Thread Chris Mason
On Thu, Jan 24, 2013 at 12:42:38PM -0700, Zach Brown wrote: + if (sv_id == 5) { + printf(%s is btrfs root\n, fullpath); + close(fd); + close(mntfd); + free(mnt); + free(fullpath); + return 1; Just wondering, at this point

Re: [PATCH 10/10] Btrfs-progs: add show subcommand to subvol cli

2013-01-24 Thread Zach Brown
Use safe unwinding in one exit path at the end, please. It's less maddening to audit and less likely to fail over time. Really, goto is your friend ;) I'm not going to use the word frenemy. I'm just not :). - z -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in

[PATCH] btrfs-progs pretty/quiet build

2013-01-24 Thread Eric Sandeen
A quieter build makes warnings more obvious. This could probably be improved, but just to see if people like this or if they hate it. :) make V=1 overrides it and gets you the full glory again. # make [CC] ctree.o [CC] disk-io.o [CC] radix-tree.o [CC]

Re: [PATCH] btrfs: fix potential null pointer dereference bug

2013-01-24 Thread Cong Ding
On Thu, Jan 24, 2013 at 10:34:20AM -0500, Josef Bacik wrote: On Sat, Jan 19, 2013 at 08:27:45AM -0700, Cong Ding wrote: The bug happens when rb_node == NULL. It causes variable node to be NULL and then the NULL pointer is dereferenced this line: BUG_ON((struct btrfs_root *)node-data !=

Re: [PATCH 2/2] Btrfs: fix memory leak on extent map after fsync

2013-01-24 Thread Liu Bo
On Thu, Jan 24, 2013 at 11:44:33AM -0500, Josef Bacik wrote: On Tue, Jan 08, 2013 at 07:49:21AM -0700, Liu Bo wrote: During fsync, we put the changed parts(i.e. extent map) into the log tree, and we ship these parts from a list of modified_extents to a local list to process, of course, we

Re: [PATCH 2/2] Btrfs: fix memory leak on extent map after fsync

2013-01-24 Thread Liu Bo
On Fri, Jan 25, 2013 at 09:38:06AM +0800, Liu Bo wrote: On Thu, Jan 24, 2013 at 11:44:33AM -0500, Josef Bacik wrote: On Tue, Jan 08, 2013 at 07:49:21AM -0700, Liu Bo wrote: During fsync, we put the changed parts(i.e. extent map) into the log tree, and we ship these parts from a list of

Re: [PATCH] Btrfs-progs: Fix minor problems with btrfslabel.c

2013-01-24 Thread Anand Jain
Thanks. comments below. On 01/24/2013 11:52 PM, Gene Czarcinski wrote: Fixed indentation, replace spaces with tabs. Signed-off-by: Danny Kukawka danny.kuka...@bisect.de Rebased, also fixed compiler warnings Signed-off-by: Gene Czarcinski g...@czarc.net --- btrfslabel.c | 57

Re: [GIT PULL] Btrfs fixes

2013-01-24 Thread Linus Torvalds
On Thu, Jan 24, 2013 at 1:52 PM, Chris Mason chris.ma...@fusionio.com wrote: Update on this, we've tracked down the crc errors and are doing final checks on the patches. Linus are you planning on taking this pull? If not I can just fold the new stuff into a bigger request. If you have them

[GIT PULL] Btrfs fixes (v2)

2013-01-24 Thread Chris Mason
Hi Linus, My for-linus branch has our batch of btrfs fixes: git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus It turns out that we had two crc bugs when running fsx-linux in a loop. Many thanks to Josef, Miao Xie, and Dave Sterba for nailing it all down. Miao also

Re: [PATCH 1/5] Btrfs: fix repeated delalloc work allocation

2013-01-24 Thread Miao Xie
On thu, 24 Jan 2013 18:20:06 +0200, Alex Lyakas wrote: - Is there something that user-space can do to avoid flushing the delalloc during snap-commit? For example, if the user-space stops the IO and does a normal commit, this will not call btrfs_start_delalloc_inodes(), but this should ensure