Re: Crashes in extent_io.c after "btrfs bad mapping eb" notice

2012-10-30 Thread Chris Samuel
On 31/10/12 10:57, Franke wrote: > I have been having some crashes like this. Since I upgraded to 3.6.4 > they have become common. The crashes happen pretty randomly during > normal system usage. After the syslog messages the system stays semi > usable for a minute, but when I run any new program

Re: [PATCH 2/9] uuid: use random32_get_bytes()

2012-10-30 Thread Huang Ying
On Tue, 2012-10-30 at 22:38 -0400, Theodore Ts'o wrote: > On Wed, Oct 31, 2012 at 09:35:37AM +0800, Huang Ying wrote: > > > > The intention of lib/uuid.c is to unify various UUID related code, and > > put them in same place. In addition to UUID generation, it provide some > > other utility and ma

Re: [PATCH 2/9] uuid: use random32_get_bytes()

2012-10-30 Thread Theodore Ts'o
On Wed, Oct 31, 2012 at 09:35:37AM +0800, Huang Ying wrote: > > The intention of lib/uuid.c is to unify various UUID related code, and > put them in same place. In addition to UUID generation, it provide some > other utility and may provide/collect more in the future. So do you > think it is a g

Re: How to find (out if) files sharing content?

2012-10-30 Thread Jeff Liu
On 10/31/2012 08:40 AM, Liu Bo wrote: > On 10/30/2012 11:20 PM, Gábor Nyers wrote: >> Hi, >> >> How could one find out if 2 files share any extents on a btrfs file system? >> >> A more generic variation of the above: How to list files on the same >> file system/subvolume sharing content? One idea i

Re: [PATCH 2/9] uuid: use random32_get_bytes()

2012-10-30 Thread Huang Ying
On Tue, 2012-10-30 at 00:48 -0400, Theodore Ts'o wrote: > On Tue, Oct 30, 2012 at 09:49:58AM +0800, Huang Ying wrote: > > The uuid_le/be_gen() in lib/uuid.c has set UUID variants to be DCE, > > that is done in __uuid_gen_common() with "b[8] = (b[8] & 0x3F) | 0x80". > > Oh, I see, I missed that. >

Re: Crashes in extent_io.c after "btrfs bad mapping eb" notice

2012-10-30 Thread Liu Bo
On 10/31/2012 08:47 AM, Liu Bo wrote: > On 10/31/2012 07:57 AM, Franke wrote: >> Hello, >> >> I have been having some crashes like this. Since I upgraded to 3.6.4 they >> have become common. The crashes happen pretty randomly during normal system >> usage. After the syslog messages the system sta

Re: Crashes in extent_io.c after "btrfs bad mapping eb" notice

2012-10-30 Thread Liu Bo
On 10/31/2012 07:57 AM, Franke wrote: > Hello, > > I have been having some crashes like this. Since I upgraded to 3.6.4 they > have become common. The crashes happen pretty randomly during normal system > usage. After the syslog messages the system stays semi usable for a minute, > but when I r

Re: [PATCH 2/2] Btrfs: make snapshot-aware defrag as a mount option

2012-10-30 Thread David Sterba
On Wed, Oct 31, 2012 at 08:34:38AM +0800, Liu Bo wrote: > Besides 'btrfs fi defrag', mounting with autodefrag may also do the same > thing. Ok, autodefrag, good point. Then I suggest to make the snapshot-aware a mode of autodefrag, not a separate option (because it would make no sense other than

Re: How to find (out if) files sharing content?

2012-10-30 Thread Liu Bo
On 10/30/2012 11:20 PM, Gábor Nyers wrote: > Hi, > > How could one find out if 2 files share any extents on a btrfs file system? > > A more generic variation of the above: How to list files on the same > file system/subvolume sharing content? > Indeed ocfs2 already has the feature where you can

Re: btrfs defrag problem

2012-10-30 Thread David Sterba
On Tue, Oct 30, 2012 at 07:47:28PM +0800, ching wrote: > failed to open /bin/bash > open:: Text file busy That's not a btrfs problem, you can't directly modify an executable that is being used. > failed to open /lib64/ld-2.15.so > failed to open /sbin/agetty > failed to open /

Re: [PATCH 2/2] Btrfs: make snapshot-aware defrag as a mount option

2012-10-30 Thread Liu Bo
On 10/31/2012 07:31 AM, David Sterba wrote: > On Sat, Oct 27, 2012 at 06:28:41PM +0800, Liu Bo wrote: >> This feature works on our crucial write endio path, so if we've got >> lots of fragments to process, it will be kind of a disaster to the >> performance, so I make such a change. >> >> One can b

Re: Why btrfs inline small file by default?

2012-10-30 Thread cwillu
On Tue, Oct 30, 2012 at 5:47 PM, ching wrote: > On 10/31/2012 06:19 AM, Hugo Mills wrote: >> On Tue, Oct 30, 2012 at 10:14:12PM +, Hugo Mills wrote: >>> On Wed, Oct 31, 2012 at 05:40:25AM +0800, ching wrote: On 10/30/2012 08:17 PM, cwillu wrote: >>> If there is a lot of small files, t

Re: btrfs defrag problem

2012-10-30 Thread ching
On 10/30/2012 08:08 PM, cwillu wrote: > On Tue, Oct 30, 2012 at 5:47 AM, ching wrote: >> Hi all, >> >> I try to defrag my btrfs root partition (run by root privilege) >> >> find / -type f -o -type d -print0 | xargs --null --no-run-if-empty btrfs >> filesystem defragment -t $((32*1024*1024)) >> >>

Re: Why btrfs inline small file by default?

2012-10-30 Thread David Sterba
On Wed, Oct 31, 2012 at 07:47:14AM +0800, ching wrote: > On 10/31/2012 06:19 AM, Hugo Mills wrote: > > On Tue, Oct 30, 2012 at 10:14:12PM +, Hugo Mills wrote: > >>> if i have 10G small files in total, then it will consume 20G by default. > >>If those small files are each 128 bytes in size,

Re: [PATCH] Btrfs: don't allow degraded mount if too many devices are missing

2012-10-30 Thread David Sterba
Patch looks ok, juste one thing that caught my attention (and does not block the patch) a bit of context: 1224 if (fs_info->fs_devices->rw_devices == 0) { 1225 ret = -EACCES; 1226 goto restore; 1227 } > +

Crashes in extent_io.c after "btrfs bad mapping eb" notice

2012-10-30 Thread Franke
Hello, I have been having some crashes like this. Since I upgraded to 3.6.4 they have become common. The crashes happen pretty randomly during normal system usage. After the syslog messages the system stays semi usable for a minute, but when I run any new program it hangs. I had to downgrade to

Re: Why btrfs inline small file by default?

2012-10-30 Thread ching
On 10/31/2012 06:19 AM, Hugo Mills wrote: > On Tue, Oct 30, 2012 at 10:14:12PM +, Hugo Mills wrote: >> On Wed, Oct 31, 2012 at 05:40:25AM +0800, ching wrote: >>> On 10/30/2012 08:17 PM, cwillu wrote: >> If there is a lot of small files, then the size of metadata will be >> undesirable d

Re: Why btrfs inline small file by default?

2012-10-30 Thread ching
On 10/31/2012 06:16 AM, cwillu wrote: > On Tue, Oct 30, 2012 at 3:40 PM, ching wrote: >> On 10/30/2012 08:17 PM, cwillu wrote: > If there is a lot of small files, then the size of metadata will be > undesirable due to deduplication Yes, that is a fact, but if that really matters depen

Re: [PATCH 2/2] Btrfs: make snapshot-aware defrag as a mount option

2012-10-30 Thread David Sterba
On Sat, Oct 27, 2012 at 06:28:41PM +0800, Liu Bo wrote: > This feature works on our crucial write endio path, so if we've got > lots of fragments to process, it will be kind of a disaster to the > performance, so I make such a change. > > One can benifit from it while mounting with '-o snap_aware_

Re: Why btrfs inline small file by default?

2012-10-30 Thread Hugo Mills
On Tue, Oct 30, 2012 at 10:14:12PM +, Hugo Mills wrote: > On Wed, Oct 31, 2012 at 05:40:25AM +0800, ching wrote: > > On 10/30/2012 08:17 PM, cwillu wrote: > > >>> If there is a lot of small files, then the size of metadata will be > > >>> undesirable due to deduplication > > >> > > >> Yes, that

Re: Why btrfs inline small file by default?

2012-10-30 Thread cwillu
On Tue, Oct 30, 2012 at 3:40 PM, ching wrote: > On 10/30/2012 08:17 PM, cwillu wrote: If there is a lot of small files, then the size of metadata will be undesirable due to deduplication >>> >>> Yes, that is a fact, but if that really matters depends on the use-case >>> (e.g., the small

Re: Why btrfs inline small file by default?

2012-10-30 Thread Hugo Mills
On Wed, Oct 31, 2012 at 05:40:25AM +0800, ching wrote: > On 10/30/2012 08:17 PM, cwillu wrote: > >>> If there is a lot of small files, then the size of metadata will be > >>> undesirable due to deduplication > >> > >> Yes, that is a fact, but if that really matters depends on the use-case > >> (e.g

Re: Why btrfs inline small file by default?

2012-10-30 Thread ching
On 10/30/2012 08:17 PM, cwillu wrote: >>> If there is a lot of small files, then the size of metadata will be >>> undesirable due to deduplication >> >> Yes, that is a fact, but if that really matters depends on the use-case >> (e.g., the small files to large files ratio, ...). But as btrfs is desi

Re: Why btrfs inline small file by default?

2012-10-30 Thread ching
On 10/30/2012 08:04 PM, Felix Pepinghege wrote: > Hi ching! > > Am 30.10.2012 12:04, schrieb ching: >> Hi all, >> >> I am testing my btrfs root partition with "max_inline=0", and 64k leaf size >> for weeks and it seems that it is fine. >> >> >> AFAIK btrfs inline small files into metadata by defau

Re: [patch 05/10] vfs: pass data to alloc_inode super operation

2012-10-30 Thread Al Viro
On Tue, Oct 30, 2012 at 08:51:42PM +, Al Viro wrote: > On Tue, Oct 30, 2012 at 04:14:39PM -0400, Jeff Moyer wrote: > > This patch passes a data pointer along to the alloc_inode > > super_operations function. The value will initially be used by > > bdev_alloc_inode to allocate the bdev_inode on

Re: [PATCH 1/2 v4] Btrfs: snapshot-aware defrag

2012-10-30 Thread Mitch Harder
On Mon, Oct 29, 2012 at 8:20 PM, Liu Bo wrote: > On 10/30/2012 04:06 AM, Mitch Harder wrote: >> On Sat, Oct 27, 2012 at 5:28 AM, Liu Bo wrote: >>> This comes from one of btrfs's project ideas, >>> As we defragment files, we break any sharing from other snapshots. >>> The balancing code will prese

Re: [patch 05/10] vfs: pass data to alloc_inode super operation

2012-10-30 Thread Al Viro
On Tue, Oct 30, 2012 at 04:14:39PM -0400, Jeff Moyer wrote: > This patch passes a data pointer along to the alloc_inode > super_operations function. The value will initially be used by > bdev_alloc_inode to allocate the bdev_inode on the same numa > node as the device to which it is tied. Yecchhh

[patch 05/10] vfs: pass data to alloc_inode super operation

2012-10-30 Thread Jeff Moyer
This patch passes a data pointer along to the alloc_inode super_operations function. The value will initially be used by bdev_alloc_inode to allocate the bdev_inode on the same numa node as the device to which it is tied. Signed-off-by: Jeff Moyer --- fs/afs/super.c |5 +++-- fs/blo

Re: [RFC][V2] New attempt to a better "btrfs fi df"

2012-10-30 Thread Chris Murphy
On Oct 30, 2012, at 12:32 PM, Michael Kjörling wrote: > > > I'm not so much concerned about the exact word being used as I feel > the same word should be used throughout a UI to describe the same > concept. Whether it's called "free" space, "unused" space, > "unallocated" space or "fuzzbar'd" s

Re: [RFC][V2] New attempt to a better "btrfs fi df"

2012-10-30 Thread Michael Kjörling
On 30 Oct 2012 19:15 +0100, from kreij...@gmail.com (Goffredo Baroncelli): > On 2012-10-30 10:42, Michael Kjörling wrote: >> what is the difference between "unused" and "unallocated"? If there >> is no difference, I feel the same word should be used throughout. > > I had to use "Unused" instead of

Re: [RFC][V2] New attempt to a better "btrfs fi df"

2012-10-30 Thread Goffredo Baroncelli
On 2012-10-30 10:42, Michael Kjörling wrote: > On 29 Oct 2012 23:21 +0100, from kreij...@gmail.com (Goffredo Baroncelli): >> Hi all, [...] > One thing, though; what is the difference between "unused" and > "unallocated"? If there is no difference, I feel the same word should > be used throughout.

[PATCH] Btrfs: don't allow degraded mount if too many devices are missing

2012-10-30 Thread Stefan Behrens
The current behavior is to allow mounting or remounting a filesystem writeable in degraded mode if at least one writeable device is present. The next failed write access to a missing device which is above the tolerance of the configured level of redundancy results in an read-only enforcement. Even

Re: Why btrfs inline small file by default?

2012-10-30 Thread David Sterba
On Tue, Oct 30, 2012 at 07:04:59PM +0800, ching wrote: > I am testing my btrfs root partition with "max_inline=0", and 64k leaf > size for weeks and it seems that it is fine. Related to inlining itself, ext4 and xfs are receiving inline data support, so it would make sense to introduce a per-file

Re: How to find (out if) files sharing content?

2012-10-30 Thread Jan Schmidt
On Tue, October 30, 2012 at 16:39 (+0100), Hugo Mills wrote: > It should be possible to walk through the > extents of a given file, and (I think) follow back-refs from the > extent back to the other files that share it. You wish :-) Backrefs are not made to walk them while the file system is onlin

Re: Need help mounting laptop corrupted root btrfs. Kernel BUG at fs/btrfs/volumes.c:3707 - FIXED

2012-10-30 Thread Marc MERLIN
On Mon, Oct 29, 2012 at 10:48:02AM -0700, Marc MERLIN wrote: > Then, I figured, I'd try mounting all the active snapshots one per one, > and they worked: > > After that, I was able to mount the root (volid 0) without a crash and > my filesystem looks fine again. Ok, I was wrong. What happened is

Re: How to find (out if) files sharing content?

2012-10-30 Thread Hugo Mills
On Tue, Oct 30, 2012 at 04:20:05PM +0100, Gábor Nyers wrote: > Hi, > > How could one find out if 2 files share any extents on a btrfs file system? > > A more generic variation of the above: How to list files on the same > file system/subvolume sharing content? You have direct (read-only) acce

How to find (out if) files sharing content?

2012-10-30 Thread Gábor Nyers
Hi, How could one find out if 2 files share any extents on a btrfs file system? A more generic variation of the above: How to list files on the same file system/subvolume sharing content? Thanks, Gábor -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a mes

Re: Why btrfs inline small file by default?

2012-10-30 Thread Felix Pepinghege
Hi ching! Am 30.10.2012 12:04, schrieb ching: Hi all, I am testing my btrfs root partition with "max_inline=0", and 64k leaf size for weeks and it seems that it is fine. AFAIK btrfs inline small files into metadata by default, I am curious why? If there is only a few small files, then there

Re: Why btrfs inline small file by default?

2012-10-30 Thread cwillu
>> If there is a lot of small files, then the size of metadata will be >> undesirable due to deduplication > > > Yes, that is a fact, but if that really matters depends on the use-case > (e.g., the small files to large files ratio, ...). But as btrfs is designed > explicitly as a general purpose fi

Re: Why btrfs inline small file by default?

2012-10-30 Thread Felix Pepinghege
Hi ching! Am 30.10.2012 12:04, schrieb ching: Hi all, I am testing my btrfs root partition with "max_inline=0", and 64k leaf size for weeks and it seems that it is fine. AFAIK btrfs inline small files into metadata by default, I am curious why? If there is only a few small files, then there

Re: Why btrfs inline small file by default?

2012-10-30 Thread Mitch Harder
On Tue, Oct 30, 2012 at 6:04 AM, ching wrote: > Hi all, > > I am testing my btrfs root partition with "max_inline=0", and 64k leaf size > for weeks and it seems that it is fine. > > > AFAIK btrfs inline small files into metadata by default, I am curious why? > > If there is only a few small files

Re: btrfs defrag problem

2012-10-30 Thread cwillu
On Tue, Oct 30, 2012 at 5:47 AM, ching wrote: > Hi all, > > I try to defrag my btrfs root partition (run by root privilege) > > find / -type f -o -type d -print0 | xargs --null --no-run-if-empty btrfs > filesystem defragment -t $((32*1024*1024)) > > > 1. This kind of error messages is prompted: >

btrfs defrag problem

2012-10-30 Thread ching
Hi all, I try to defrag my btrfs root partition (run by root privilege) find / -type f -o -type d -print0 | xargs --null --no-run-if-empty btrfs filesystem defragment -t $((32*1024*1024)) 1. This kind of error messages is prompted: failed to open /bin/bash open:: Text file busy to

Why btrfs inline small file by default?

2012-10-30 Thread ching
Hi all, I am testing my btrfs root partition with "max_inline=0", and 64k leaf size for weeks and it seems that it is fine. AFAIK btrfs inline small files into metadata by default, I am curious why? If there is only a few small files, then there will be neither effect nor benefit at all If th

Re: [RFC][V2] New attempt to a better "btrfs fi df"

2012-10-30 Thread Michael Kjörling
On 29 Oct 2012 23:21 +0100, from kreij...@gmail.com (Goffredo Baroncelli): > Hi all, > > this is a new attempt to improve the output of the command "btrfs fi df". > > The previous attempt received a good reception. However there was no a > general consensus about the wording. In general, I like