Re: WARNING: at fs/btrfs/free-space-cache.c:1887 after hard shutdown.

2012-06-27 Thread Duncan
Jordan Windsor posted on Wed, 27 Jun 2012 13:16:44 +0930 as excerpted: My computer locked up and I had to press the reset button. Ever since then I can't mount the btrfs filesystem, here's the output: Are you aware of the btrfs wiki and have you read up on btrfs there, yet?

Re: fio reports data corruption with btrfs

2012-06-27 Thread Alex Lyakas
Hi Josef, I have rerun the test with btrfs-next master branch. fio reported mismatched blocks again. Mount options were the same (-o noatime,nodatacow). In both cases the drive is a 135Gb drive, while the total size of allocated block groups is around 60Gb: Data: total=62.01GB, used=49.04GB

Re: [PATCH 0/5] introduce btrfs filesystem property command

2012-06-27 Thread Alexander Block
On Wed, Jun 27, 2012 at 4:25 AM, Liu Bo liubo2...@cn.fujitsu.com wrote: On 06/25/2012 05:20 AM, Alexander Block wrote: This patchset introduces the btrfs filesystem property command. It is the result of a discussion we had on IRC. I tried to make the properties interface as generic and

btrfs filesystem defragment exits with non-zero return code (20) upon success

2012-06-27 Thread Lenz Grimmer
Hi, running btrfs filesystem defrag somehow always returns a non-zero exit code, even when it succeeds: [lenz@metis btrfs-progs]% sudo ./btrfs filesystem defrag -v /mnt /mnt Btrfs v0.19-102-g2482539-dirty [lenz@metis btrfs-progs]% echo $? 20 [lenz@metis btrfs-progs]% sudo ./btrfs filesystem

Error compiling btrfs-tools from git (undefined reference to `pthread_create')

2012-06-27 Thread Lenz Grimmer
On Ubuntu 11.10 Oneiric with gcc 4.6.1, compiling the btrfs tools from git fails for me with the following error: [lenz@metis btrfs-progs]% make bash version.sh gcc -lpthread -g -Werror -Os -o btrfs btrfs.o btrfs_cmds.o scrub.o \ ctree.o disk-io.o radix-tree.o extent-tree.o

Re: btrfs filesystem defragment exits with non-zero return code (20) upon success

2012-06-27 Thread Hugo Mills
On Wed, Jun 27, 2012 at 02:05:55PM +0200, Lenz Grimmer wrote: Hi, running btrfs filesystem defrag somehow always returns a non-zero exit code, even when it succeeds: Yes, this is a known problem, and one that's on my list of things to deal with. Thanks for the reminder, though. I'm no

Re: Error compiling btrfs-tools from git (undefined reference to `pthread_create')

2012-06-27 Thread cwillu
On Wed, Jun 27, 2012 at 6:11 AM, Lenz Grimmer l...@grimmer.com wrote: On Ubuntu 11.10 Oneiric with gcc 4.6.1, compiling the btrfs tools from git fails for me with the following error: Which git repo? git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs.git builds on ubuntu just fine

[RFC PATCHv2 0/3] Btrfs-progs: introduce btrfs property subgroup

2012-06-27 Thread Alexander Block
This patchset introduces the btrfs property subgroup. It is the result of a discussion we had on IRC. I tried to make the properties interface as generic and extensible as possible. Comments are welcome. Currently the command group looks like this: btrfs prop set [-t type] /path/to/object name

[RFC PATCHv2 1/3] Btrfs-progs: add BTRFS_IOC_SUBVOL_GET/SETFLAGS to ioctl.h

2012-06-27 Thread Alexander Block
Btrfs send/receive and btrfs props needs this ioctl. This patch requires a recent kernel with the Btrfs: use _IOR for BTRFS_IOC_SUBVOL_GETFLAGS patch applied. Signed-off-by: Alexander Block abloc...@googlemail.com --- ioctl.h |2 ++ 1 file changed, 2 insertions(+) diff --git a/ioctl.h

[RFC PATCHv2 2/3] Btrfs-progs: let get_label return the label instead of of printing it

2012-06-27 Thread Alexander Block
get_label prints the label at the moment. Change this so that the label is returned and printing is done by the caller. Also bail out when open_ctree failed to avoid a crash when btrfs fi label is called on a device with no btrfs on it. Signed-off-by: Alexander Block abloc...@googlemail.com ---

[RFC PATCHv2 3/3] Btrfs-progs: introduce btrfs property subgroup

2012-06-27 Thread Alexander Block
btrfs filesystem property is a generic interface to set/get properties on filesystem objects (inodes/subvolumes/filesystems /devs). This patch adds the generic framework for properties and also implements two properties. The first is the read-only property for subvolumes and the second is the

Re: btrfs deadlock in 3.5-rc3

2012-06-27 Thread Josef Bacik
On Tue, Jun 26, 2012 at 11:47:15PM -0600, Stefan Priebe - Profihost AG wrote: Yes i will do so. Right now i was trying to compare discard with non discard with this simple command: for i in `seq 0 1 1000`; do dd if=/dev/zero of=t_$i bs=4M count=1; rm t_$i; done; But i hit a new bug:

Re: fio reports data corruption with btrfs

2012-06-27 Thread Josef Bacik
On Wed, Jun 27, 2012 at 02:15:59AM -0600, Alex Lyakas wrote: Hi Josef, I have rerun the test with btrfs-next master branch. fio reported mismatched blocks again. Mount options were the same (-o noatime,nodatacow). Ok I'll try running it again here locally, I didn't realize it was nodatacow.

Re: WARNING: at fs/btrfs/free-space-cache.c:1887 after hard shutdown.

2012-06-27 Thread Josef Bacik
On Tue, Jun 26, 2012 at 09:46:44PM -0600, Jordan Windsor wrote: Hello, My computer locked up and I had to press the reset button. Ever since then I can't mount the btrfs filesystem, here's the output: Already fixed, go to the newest kernel you can get ahold of, 3.5-rc4 is the newest I think?

Re: waiting for deferred cleanup operations

2012-06-27 Thread David Sterba
On Tue, Jun 26, 2012 at 08:55:20PM -0500, David Nicol wrote: I've noticed that the patches I posted here two years ago about an ioctl to allow userspace to wait for deferred ops to complete aren't included in the has all patches posted to mailing list git repo. Is this an oversight or is there

Re: btrfs volume suddenly becomes read-only

2012-06-27 Thread Josef Bacik
On Wed, Jun 27, 2012 at 10:32:22AM -0600, Chester wrote: Hey Josef, the btrfsck was dirty. Here it is pasted inline. Ok, do btrfsck --repair on the device (the device must be unmounted) and hopefully it will fix everything. Thanks, Josef -- To unsubscribe from this list: send the line

Re: [PATCH] Allow cross subvolume reflinks (2nd attempt)

2012-06-27 Thread Marc MERLIN
On Wed, Jun 20, 2012 at 12:35:11PM +0200, Alexander Block wrote: Hello, This is the second attempt to bring in cross subvolume reflinks into btrfs. The first attempt was NAKed due to missing vfs mount checks and a clear description of what btrfs subvolumes are and probably also why cross

[PATCH 5/7] Btrfs: leave critical region in btrfs_find_all_roots as soon as possible

2012-06-27 Thread Jan Schmidt
When delayed refs exist, btrfs_find_all_roots used to hold the delayed ref mutex way longer than actually required. We ought to drop it immediately after we're done collecting all the delayed refs. Signed-off-by: Jan Schmidt list.bt...@jan-o-sch.net --- fs/btrfs/backref.c |3 +-- 1 files

[PATCH 6/7] Btrfs: fix tree mod log rewind of ADD operations

2012-06-27 Thread Jan Schmidt
When a MOD_LOG_KEY_ADD operation is rewinded, we remove the key from the tree block. If its not the last key, removal involves a move operation. This move operation was explicitly done before this commit. However, at insertion time, there's a move operation before the actual addition to make room

[PATCH 0/7] Btrfs: fixes for 3.5-rc5

2012-06-27 Thread Jan Schmidt
Hi Chris, I expect this to be my last fixup set for the 3.5 series. All seven fixes are pretty small, five of them for the tree mod log (3-7), one generic for backref walking (2) and one fixing a starvation issue when waiting for more delayed refs (1). You can pull my patches based on your

[PATCH 1/7] Btrfs: avoid waiting for delayed refs when we must not

2012-06-27 Thread Jan Schmidt
We track two conditions to decide if we should sleep while waiting for more delayed refs, the number of delayed refs (num_refs) and the first entry in the list of blockers (first_seq). When we suspect staleness, we save num_refs and do one more cycle. If nothing changes, we then save first_seq

[PATCH 2/7] Btrfs: support root level changes in __resolve_indirect_ref

2012-06-27 Thread Jan Schmidt
With the tree mod log, we can have a tree that's two levels high, but btrfs_search_old_slot may still return a path with the tree root at level one instead. __resolve_indirect_ref must care for this and accept parents in a lower level than expected. Signed-off-by: Jan Schmidt

[PATCH 4/7] Btrfs: always put insert_ptr modifications into the tree mod log

2012-06-27 Thread Jan Schmidt
Several callers of insert_ptr set the tree_mod_log parameter to 0 to avoid addition to the tree mod log. In fact, we need all of those operations. This commit simply removes the additional parameter and makes addition to the tree mod log unconditional. Signed-off-by: Jan Schmidt

[PATCH 3/7] Btrfs: fix tree mod log for root replacements at leaf level

2012-06-27 Thread Jan Schmidt
For the tree mod log, we don't log any operations at leaf level. If the root is at the leaf level (i.e. the tree consists only of the root), then __tree_mod_log_oldest_root will find a ROOT_REPLACE operation in the log (because we always log that one no matter which level), but no other

[PATCH 7/7] Btrfs: resolve tree mod log locking issue in btrfs_next_leaf

2012-06-27 Thread Jan Schmidt
With the tree mod log, we may end up with two roots (the current root and a rewinded version of it) both pointing to two leaves, l1 and l2, of which l2 had already been cow-ed in the current transaction. If we don't rewind any tree blocks, we cannot have two roots both pointing to an already cowed

Re: [RFC PATCHv2 0/3] Btrfs-progs: introduce btrfs property subgroup

2012-06-27 Thread Goffredo Baroncelli
Hi Alexander, On 06/27/2012 03:16 PM, Alexander Block wrote: This patchset introduces the btrfs property subgroup. It is the result of a discussion we had on IRC. I tried to make the properties interface as generic and extensible as possible. Comments are welcome. Currently the command

Re: 3.5.0-rc4: kernel BUG at fs/btrfs/inode.c:3758!

2012-06-27 Thread Josef Bacik
On Wed, Jun 27, 2012 at 11:24:30AM -0600, Frederik Himpe wrote: After an unclean shutdown, Linux 3.5-rc4 fails to mount one of my btrfs file systems. This backtrace can be found in the logs: Fix is in btrfs-next http://git.kernel.org/?p=linux/kernel/git/josef/btrfs-next.git;a=summary Thanks,

Re: waiting for deferred cleanup operations

2012-06-27 Thread David Nicol
silly gmail rich-text... On Wed, Jun 27, 2012 at 1:42 PM, David Nicol davidni...@gmail.com wrote: On Wed, Jun 27, 2012 at 9:31 AM, David Sterba d...@jikos.cz wrote: On Tue, Jun 26, 2012 at 08:55:20PM -0500, David Nicol wrote: [let's discuss the] architecture Simply waiting is not

Re: btrfs oops with kernel 3.5-rc4

2012-06-27 Thread Nathan A. Mourey II
On Tue, 2012-06-26 at 16:19 -0400, Josef Bacik wrote: list *(btrfs_finish_ordered_io+0x22) Reading symbols from /home/nmoureyii/kernel/linux-3.5-rc4/vmlinux...done. (gdb) list *(btrfs_finish_ordered_io+0x22) 0xc1237552 is in btrfs_finish_ordered_io (fs/btrfs/inode.c:1864). 1859 * fully

Re: [RFC PATCHv2 0/3] Btrfs-progs: introduce btrfs property subgroup

2012-06-27 Thread Alexander Block
On Wed, Jun 27, 2012 at 7:41 PM, Goffredo Baroncelli kreij...@libero.it wrote: Hi Alexander, On 06/27/2012 03:16 PM, Alexander Block wrote: This patchset introduces the btrfs property subgroup. It is the result of a discussion we had on IRC. I tried to make the properties interface as

Re: btrfs volume suddenly becomes read-only

2012-06-27 Thread Chester
On Wed, Jun 27, 2012 at 11:45 AM, Josef Bacik jba...@fusionio.com wrote: On Wed, Jun 27, 2012 at 10:32:22AM -0600, Chester wrote: Hey Josef, the btrfsck was dirty. Here it is pasted inline. Ok, do btrfsck --repair on the device (the device must be unmounted) and hopefully it will fix

[PATCH] Btrfs: hold a ref on the inode during writepages

2012-06-27 Thread Josef Bacik
We can race with unlink and not actually be able to do our igrab in btrfs_add_ordered_extent. This will result in all sorts of problems. Instead of doing the complicated work to try and handle returning an error properly from btrfs_add_ordered_extent, just hold a ref to the inode during

Re: btrfs oops with kernel 3.5-rc4

2012-06-27 Thread Josef Bacik
On Wed, Jun 27, 2012 at 12:57:52PM -0600, Nathan A. Mourey II wrote: On Tue, 2012-06-26 at 16:19 -0400, Josef Bacik wrote: list *(btrfs_finish_ordered_io+0x22) Reading symbols from /home/nmoureyii/kernel/linux-3.5-rc4/vmlinux...done. (gdb) list *(btrfs_finish_ordered_io+0x22) 0xc1237552 is

Re: btrfs deadlock in 3.5-rc3

2012-06-27 Thread Josef Bacik
On Tue, Jun 26, 2012 at 11:47:15PM -0600, Stefan Priebe - Profihost AG wrote: Yes i will do so. Right now i was trying to compare discard with non discard with this simple command: for i in `seq 0 1 1000`; do dd if=/dev/zero of=t_$i bs=4M count=1; rm t_$i; done; But i hit a new bug:

Re: [PATCH] Btrfs: fix dio write vs buffered read race V2

2012-06-27 Thread Miao Xie
On Tue, 26 Jun 2012 09:42:56 -0400, Josef Bacik wrote: From: Josef Bacik jo...@redhat.com Miao pointed out there's a problem with mixing dio writes and buffered reads. If the read happens between us invalidating the page range and actually locking the extent we can bring in pages into page