Re: btrfs deadlock in 3.5-rc3

2012-06-26 Thread Stefan Priebe - Profihost AG
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: [39577.660228] BUG: unable to handle kernel paging request at fe50 [39577.

Re: Long btrfs hangs during suspend to RAM / BTRFS warning (device dm-0): Aborting unused transaction

2012-06-26 Thread Marc MERLIN
On Tue, Jun 26, 2012 at 06:38:18PM -0700, Marc MERLIN wrote: > Now, I'm also seeing these below and I have this again (86% CPU): > 6076 root 20 0 000 R 86 0.0 29:40.11 btrfs-delalloc- > > > How bad is it, doctor? I think I'll be going back to 3.2.16 for now though. B

Re: btrfs volume suddenly becomes read-only

2012-06-26 Thread Chester
Problem still occurs.. With just a bittorrent client (downloading) + chrome running. This could also be related but, last night, I triggered a btrfs balance.. I'm not too sure whether the balance finished or not, because when I took a look at it this morning, it said "no file or directory" and tol

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

2012-06-26 Thread Jordan Windsor
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: [ 37.645583] [ cut here ] [ 37.645598] WARNING: at fs/btrfs/free-space-cache.c:1887 btrfs_remove_free_space+0x329/0x350 [btrfs]() [

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

2012-06-26 Thread Liu Bo
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 extensible as possible. Comments are welcome. > > Currently the command look

Re: waiting for deferred cleanup operations

2012-06-26 Thread David Nicol
I see that the #undef spells the macro wrong, so I'll fix that of course too. On Tue, Jun 26, 2012 at 8:55 PM, David Nicol wrote: > The whole picture is in the introduction to the last submitted version > of the patch, > http://permalink.gmane.org/gmane.comp.file-systems.btrfs/8668 -- To unsubs

waiting for deferred cleanup operations

2012-06-26 Thread David Nicol
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 a problem with the proposed architecture or implementation? Th

Re: Long btrfs hangs during suspend to RAM / BTRFS warning (device dm-0): Aborting unused transaction

2012-06-26 Thread Marc MERLIN
On Tue, Jun 26, 2012 at 12:36:37PM -0700, Marc MERLIN wrote: > I was fine with btrfs until 3.2.16, but when going to 3.4 or 3.4.4, I'm > having my system randomly not wanting to suspend to RAM. > > My suspend light started flashing but the system wasn't suspending. > I was able to unlock X, run to

Re: System Policy for Filenames

2012-06-26 Thread Fajar A. Nugraha
On Wed, Jun 27, 2012 at 1:28 AM, Aaron Peterson wrote: > Billy, > > Thank you! I will look into FUSE. > > Ultimately, I want my / to be mounted with these rules,  I will need a > boot loader to be able to handle it. Try looking at how ubuntu live cd works. Last time I check, it can use unionfs-fu

Re: btrfs deadlock in 3.5-rc3

2012-06-26 Thread Josef Bacik
On Tue, Jun 26, 2012 at 02:19:17PM -0600, Stefan Priebe wrote: > Am 26.06.2012 22:14, schrieb Josef Bacik: > > I can't reproduce so I'm going to have to figure out a way to debug it > > through > > you, as soon as I think of something I will let you know. Thanks, > > > > Thanks. You mentioned th

Re: btrfs oops with kernel 3.5-rc4

2012-06-26 Thread Josef Bacik
On Tue, Jun 26, 2012 at 02:09:19PM -0600, Nathan A. Mourey II wrote: > Oops with kernel v3.5-rc4. This error produced while: > > emerge --sync && emerge --update --newuse --deep --with-bdeps=y @world && > emerge --depclean && revdep-rebuild > and > stress --cpu 1 --io 8 -d 8 --vm 4 -t 8h >

Re: btrfs deadlock in 3.5-rc3

2012-06-26 Thread Stefan Priebe
Am 26.06.2012 22:14, schrieb Josef Bacik: I can't reproduce so I'm going to have to figure out a way to debug it through you, as soon as I think of something I will let you know. Thanks, Thanks. You mentioned that discard shouldn't have any positive effects on a SSD. May i see a sideffect?

Re: btrfs deadlock in 3.5-rc3

2012-06-26 Thread Josef Bacik
On Tue, Jun 26, 2012 at 10:47:56AM -0600, Stefan Priebe wrote: > Am 25.06.2012 22:23, schrieb Josef Bacik: > > On Mon, Jun 25, 2012 at 02:20:31PM -0600, Stefan Priebe wrote: > >> Am 25.06.2012 22:11, schrieb Josef Bacik: > >>> On Mon, Jun 25, 2012 at 01:33:09PM -0600, Stefan Priebe wrote: > Wi

[PATCH] Btrfs: change how we indicate we're adding csums

2012-06-26 Thread Josef Bacik
There is weird logic I had to put in place to make sure that when we were adding csums that we'd used the delalloc block rsv instead of the global block rsv. Part of this meant that we had to free up our transaction reservation before we ran the delayed refs since csum deletion happens during the

btrfs oops with kernel 3.5-rc4

2012-06-26 Thread Nathan A. Mourey II
Oops with kernel v3.5-rc4. This error produced while: emerge --sync && emerge --update --newuse --deep --with-bdeps=y @world && emerge --depclean && revdep-rebuild and stress --cpu 1 --io 8 -d 8 --vm 4 -t 8h ver_linux.sh was ran on stable v3.4.4 system. Linux peach.example.com 3.4.4 #2 S

Re: New btrfs-progs integration branch

2012-06-26 Thread Alex Lyakas
Thanks, Hugo. At this point I mostly want to learn and stay up-to-date with new patches coming in. Alex. On Tue, Jun 26, 2012 at 12:58 PM, Hugo Mills wrote: > On Tue, Jun 26, 2012 at 11:58:41AM +0300, Alex Lyakas wrote: >> Hi Hugo, >> forgive me, but I am somewhat confused. >> What is the "mai

Re: System Policy for Filenames

2012-06-26 Thread Aaron Peterson
Billy, Thank you! I will look into FUSE. Ultimately, I want my / to be mounted with these rules,  I will need a boot loader to be able to handle it. I am wondering if filesystem software has hooks for AppArmor or SELinux, or some other Linux Security Module would be appropriated to add to files

Re: [PATCH 1/2] Btrfs: restore restriper state on all mounts

2012-06-26 Thread Ilya Dryomov
First of all, thanks for reviewing! On Tue, Jun 26, 2012 at 06:17:39PM +0200, David Sterba wrote: > On Fri, Jun 22, 2012 at 09:24:12PM +0300, Ilya Dryomov wrote: > > Fix a bug that triggered asserts in btrfs_balance() in both normal and > > resume modes -- restriper state was not properly restored

Re: btrfs deadlock in 3.5-rc3

2012-06-26 Thread Stefan Priebe
Am 25.06.2012 22:23, schrieb Josef Bacik: On Mon, Jun 25, 2012 at 02:20:31PM -0600, Stefan Priebe wrote: Am 25.06.2012 22:11, schrieb Josef Bacik: On Mon, Jun 25, 2012 at 01:33:09PM -0600, Stefan Priebe wrote: With v3.4 the same. Can't go back more as this really results in very fast corruptio

Re: [PATCH 1/2] Btrfs: restore restriper state on all mounts

2012-06-26 Thread David Sterba
On Fri, Jun 22, 2012 at 09:24:12PM +0300, Ilya Dryomov wrote: > Fix a bug that triggered asserts in btrfs_balance() in both normal and > resume modes -- restriper state was not properly restored on read-only > mounts. This factors out resuming code from btrfs_restore_balance(), > which is now also

Re: [PATCH] Btrfs: check return value of btrfs_set_extent_delalloc()

2012-06-26 Thread Josef Bacik
On Tue, Jun 26, 2012 at 07:26:53AM -0600, David Sterba wrote: > On Tue, Jun 26, 2012 at 12:22:10PM +0900, Tsutomu Itoh wrote: > > btrfs_set_extent_delalloc() has the possibility of returning the error. > > So I add the code in which the return value of btrfs_set_extent_delalloc() > > is checked. >

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

2012-06-26 Thread Josef Bacik
From: Josef Bacik 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 cache. Then once the write finishes if somebody tries to read again it will

Re: [PATCH] Btrfs: check return value of btrfs_set_extent_delalloc()

2012-06-26 Thread David Sterba
On Tue, Jun 26, 2012 at 12:22:10PM +0900, Tsutomu Itoh wrote: > btrfs_set_extent_delalloc() has the possibility of returning the error. > So I add the code in which the return value of btrfs_set_extent_delalloc() > is checked. The caller is cluster_pages_for_defrag, the only error I see returned v

Re: [PATCH V2] Btrfs: fix old data problem caused by aio vs dio

2012-06-26 Thread Josef Bacik
On Tue, Jun 26, 2012 at 12:07:17AM -0600, Miao Xie wrote: > The 209th case of xfstests failed because of the race between aio and dio. The > detail reason is following: > Task1 Task2 Btrfs-worker > invalidate pages > read pages >

Re: 3.5-rc4: BTRFS unmountable after hard lockup

2012-06-26 Thread Josef Bacik
On Mon, Jun 25, 2012 at 09:47:33PM -0600, Liu Bo wrote: > On 06/26/2012 06:18 AM, David Sterba wrote: > > > 3756 if (root->fs_info->log_root_recovering) { > > 3757 BUG_ON(!test_bit(BTRFS_INODE_HAS_ORPHAN_ITEM, > > 3758 &BTRFS_I(inode)->runti

Re: [PATCH] Btrfs: return error of btrfs_update_inode() to caller

2012-06-26 Thread David Sterba
On Tue, Jun 26, 2012 at 12:25:22PM +0900, Tsutomu Itoh wrote: > We didn't check error of btrfs_update_inode(), but that error looks > easy to bubble back up. Yep, the callers check for the retvals, and the one missed in __btrfs_unlink_inode seems serious, as unlink_inode and rename would not see t

Re: 3.5-rc4: BTRFS unmountable after hard lockup

2012-06-26 Thread Martin Steigerwald
Am Dienstag, 26. Juni 2012 schrieb Liu Bo: > On 06/26/2012 06:18 AM, David Sterba wrote: > > 3756 if (root->fs_info->log_root_recovering) { > > 3757 BUG_ON(!test_bit(BTRFS_INODE_HAS_ORPHAN_ITEM, > > 3758 &BTRFS_I(inode)->runtime_flags)); > >

Re: [PATCH] Btrfs: use _IOR for BTRFS_IOC_SUBVOL_GETFLAGS

2012-06-26 Thread David Sterba
On Mon, Jun 25, 2012 at 11:36:12PM +0200, Alexander Block wrote: > We used the wrong ioctl macro for the getflags ioctl before. > As we don't have the set/getflags ioctls in the user space ioctl.h > at the moment, it's safe to fix it now. The _IOW is clearly wrong here, the direction is 'from kern

Re: how to cleanup old superblock

2012-06-26 Thread Sander
David Sterba wrote (ao): > Thanks. I redid the calculations and the statement that it 'will not > touch anything else' may not be correct in rare cases. What about wipefs? "wipefs allows to erase filesystem or raid signatures (magic strings) from the device to make the filesystem invisible for li

Re: how to cleanup old superblock

2012-06-26 Thread David Sterba
On Tue, Jun 26, 2012 at 10:53:24AM +0200, Xavier Nicollet wrote: > Le 26 June 2012 ? 00:49, David Sterba a écrit: > > On Mon, Jun 25, 2012 at 11:54:50PM +0400, Dmitry MiksIr wrote: > > > Hello! > > > Long time ago I created btrfs on /dev/sda > > > After some changes btrfs moved to /dev/sda1 (well,

Re: New btrfs-progs integration branch

2012-06-26 Thread Hugo Mills
On Tue, Jun 26, 2012 at 11:58:41AM +0300, Alex Lyakas wrote: > Hi Hugo, > forgive me, but I am somewhat confused. > What is the "main" repo of btrfs-progs, if there is such thing? > I see patches coming in, but no updates to > git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs.git, > w

Re: [PATCH] Btrfs: fix wrong check during log recovery

2012-06-26 Thread David Sterba
On Tue, Jun 26, 2012 at 11:59:09AM +0800, Liu Bo wrote: > When we're evicting an inode during log recovery, we need to ensure that the > inode > is not in orphan state any more, which means inode's run_time flags has _no_ > BTRFS_INODE_HAS_ORPHAN_ITEM. Thus, the BUG_ON was triggered because of a

Re: how to cleanup old superblock

2012-06-26 Thread Xavier Nicollet
Le 26 June 2012 ? 00:49, David Sterba a écrit: > On Mon, Jun 25, 2012 at 11:54:50PM +0400, Dmitry MiksIr wrote: > > Hello! > > Long time ago I created btrfs on /dev/sda > > After some changes btrfs moved to /dev/sda1 (well, to md, and sda1 is part > > of md). > > > > As result, show me 2 filesyst

Re: New btrfs-progs integration branch

2012-06-26 Thread Alex Lyakas
Hi Hugo, forgive me, but I am somewhat confused. What is the "main" repo of btrfs-progs, if there is such thing? I see patches coming in, but no updates to git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs.git, which I thought was the one. Can you pls clarify where should I pull upda

Re: fio reports data corruption with btrfs

2012-06-26 Thread Alex Lyakas
Hi Josef, Mount options were noatime, nodatacow. So you say that fio might have received ENOSPC, but didn't abort the test? I will compile your branch and let you know. I did not see any error messages from the kernel, except from: Jun 25 10:04:28 vc kernel: [ 436.730890] btrfs: setting nodataco