Re: [PATCH v1 6/6] scrub: add fixup code for errors on nodatasum files

2011-06-16 Thread David Sterba
On Mon, Jun 13, 2011 at 09:10:39PM +0200, Jan Schmidt wrote: > This removes a FIXME comment and introduces the first part of nodatasum > fixup: It gets the corresponding inode for a logical address and triggers a > regular readpage for the corrupted sector. > > Once we have on-the-fly error correc

Re: [PATCH v1 3/6] scrub: print paths of corrupted files

2011-06-16 Thread David Sterba
On Mon, Jun 13, 2011 at 09:10:36PM +0200, Jan Schmidt wrote: > While scrubbing, we may encounter various errors. Previously, a logical > address was printed to the log only. Now, all paths belonging to that > address are resolved and printed separately. That should work for hardlinks > as well as r

Re: [PATCH v1 2/6] scrub: added unverified_errors

2011-06-16 Thread David Sterba
On Mon, Jun 13, 2011 at 09:10:35PM +0200, Jan Schmidt wrote: > In normal operation, scrub is reading data sequentially in large portions. > In case of an i/o error, we try to find the corrupted area(s) by issuing > page sized read requests. With this commit we increment the > unverified_errors coun

Re: [PATCH v1 1/6] added helper functions to iterate backrefs

2011-06-16 Thread David Sterba
On Mon, Jun 13, 2011 at 09:10:34PM +0200, Jan Schmidt wrote: > These helper functions iterate back references and call a function for each > backref. There is also a function to resolve an inode to a path in the > file system. > > Signed-off-by: Jan Schmidt > --- > fs/btrfs/Makefile |3 +- >

Re: [RFC][BTRFS-PROG] Avoid to scan cdrom and floppy

2011-06-16 Thread Goffredo Baroncelli
Hi Helmut On 06/16/2011 05:09 PM, Helmut Hullen wrote: Hallo, Josef, Du meintest am 16.06.11: Who the hell doesn't use udev? Me - p.e. "udev" may be interesting for desktop users, for multimedia computers. It's not necessary for a simple server, for a machine where the administrator wants

Re: [PATCH 2/2] btrfs: fix deadlock when doing reservation

2011-06-16 Thread Josef Bacik
On 06/16/2011 01:17 PM, Mitch Harder wrote: > On Thu, Jun 16, 2011 at 9:52 AM, Josef Bacik wrote: >> On 06/16/2011 10:36 AM, Mitch Harder wrote: >>> 2011/6/15 Josef Bacik : On 06/15/2011 06:47 AM, Miao Xie wrote: > The following deadlock may happen when doing reservation for metadata: >>>

Re: [PATCH 2/2] btrfs: fix deadlock when doing reservation

2011-06-16 Thread Mitch Harder
On Thu, Jun 16, 2011 at 9:52 AM, Josef Bacik wrote: > On 06/16/2011 10:36 AM, Mitch Harder wrote: >> 2011/6/15 Josef Bacik : >>> On 06/15/2011 06:47 AM, Miao Xie wrote: The following deadlock may happen when doing reservation for metadata: Task0                         Flush thread

Re: [RFC][BTRFS-PROG] Avoid to scan cdrom and floppy

2011-06-16 Thread Helmut Hullen
Hallo, Josef, Du meintest am 16.06.11: >>> Who the hell doesn't use udev? >> Me - p.e. >> "udev" may be interesting for desktop users, for multimedia >> computers. It's not necessary for a simple server, for a machine >> where the administrator wants to rule instead of "udev". > You don't need

Re: [RFC][BTRFS-PROG] Avoid to scan cdrom and floppy

2011-06-16 Thread Josef Bacik
On 06/16/2011 10:45 AM, Helmut Hullen wrote: > Hallo, Josef, > > Du meintest am 16.06.11: > >>> Thank you - it's nice for all who don't use udev. > >> Who the hell doesn't use udev? > > Me - p.e. > "udev" may be interesting for desktop users, for multimedia computers. > It's not necessary for

Re: [RFC][BTRFS-PROG] Avoid to scan cdrom and floppy

2011-06-16 Thread Helmut Hullen
Hallo, Josef, Du meintest am 16.06.11: >> Thank you - it's nice for all who don't use udev. > Who the hell doesn't use udev? Me - p.e. "udev" may be interesting for desktop users, for multimedia computers. It's not necessary for a simple server, for a machine where the administrator wants t

Re: [PATCH 2/2] btrfs: fix deadlock when doing reservation

2011-06-16 Thread Josef Bacik
On 06/16/2011 10:36 AM, Mitch Harder wrote: > 2011/6/15 Josef Bacik : >> On 06/15/2011 06:47 AM, Miao Xie wrote: >>> The following deadlock may happen when doing reservation for metadata: >>> >>> Task0 Flush threadTask1 >>> start_transaction() >>> shrink_delall

Re: [PATCH 2/2] btrfs: fix deadlock when doing reservation

2011-06-16 Thread Mitch Harder
2011/6/15 Josef Bacik : > On 06/15/2011 06:47 AM, Miao Xie wrote: >> The following deadlock may happen when doing reservation for metadata: >> >> Task0                         Flush thread            Task1 >> start_transaction() >>   shrink_delalloc() >>     writeback_inodes_sb_nr() >>       wait f

Re: [RFC][BTRFS-PROG] Avoid to scan cdrom and floppy

2011-06-16 Thread Josef Bacik
On 06/15/2011 04:35 PM, Helmut Hullen wrote: > Hallo, Goffredo, > > Du meintest am 15.06.11: > >> thanks to the last Hugo's email, I restart to work on the patch which >> avoid to scan cdrom and floppy during a "btrfs filesystem show" and a >> "btrfs device scan". Comparing to my previous patch I

Re: btrfs defra

2011-06-16 Thread David Nicol
>   Defrag works on individual files, and tries to find a contiguous > sequence of bytes to write the file's data to. In the process, the > current implementation will break any CoW duplication -- either within > single files (copies with cp --reflink=always) or files copied via > snapshotting. W

[PATCH 2/2] Btrfs: fix 'ls -lis' mismatch

2011-06-16 Thread Liu Bo
As btrfs uses delay allocation mechanism and data=order mode, there can be a period window, during which we sub delalloc_bytes and add_inode_bytes, and we may get a value of '0' referred to inode's blocks via 'ls -lis'. ino:291 blocks:198656 i_blocks:0 i_bytes:0 delalloc_bytes:101711872 ino:291 bl

[PATCH 1/2] Btrfs: kill location key of in-memory inode

2011-06-16 Thread Liu Bo
In btrfs's in-memory inode, there is a btrfs_key which has the structure: - key.objectid : inode id - key.type: BTRFS_INODE_ITEM_KEY - key.offset: 0 or -1ULL however, we only use key.objectid to search, to check or something else, and to reduce in-memory inode size I just keep what is valuable. S

[PATCH 1/2] Btrfs: kill location key of in-memory inode

2011-06-16 Thread Liu Bo
In btrfs's in-memory inode, there is a btrfs_key which has the structure: - key.objectid : inode id - key.type: BTRFS_INODE_ITEM_KEY - key.offset: 0 or -1ULL however, we only use key.objectid to search, to check or something else, and to reduce in-memory inode size I just keep what is valuable. S

[PATCH 2/2] Btrfs: fix 'ls -lis' mismatch

2011-06-16 Thread Liu Bo
As btrfs uses delay allocation mechanism and data=order mode, there can be a period window, during which we sub delalloc_bytes and add_inode_bytes, and we may get a value of '0' referred to inode's blocks via 'ls -lis'. ino:291 blocks:198656 i_blocks:0 i_bytes:0 delalloc_bytes:101711872 ino:291 bl

[PATCH] btrfs: Remove unused sysfs code

2011-06-16 Thread Maarten Lankhorst
Removes code no longer used. The sysfs file itself is kept, because the btrfs developers expressed interest in putting new entries to sysfs. Signed-off-by: Maarten Lankhorst --- diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 378b5b4..81f4083 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/c