Re: [PATCH v5 1/3] Btrfs-progs: move open_file_or_dir() to utils.c

2012-06-08 Thread Stefan Behrens
On Thu, 07 Jun 2012 21:38:25 +0200, Goffredo Baroncelli wrote: Hi Stefan, On 05/25/2012 04:07 PM, Stefan Behrens wrote: This is a preparation step to add support for device stats. The definition of the function open_file_or_dir() is moved from common.c to utils.c in order to be able

[PATCH] Btrfs-progs: remove btrfsctl, btrfs-show and btrfs-vol from default build

2012-06-08 Thread Stefan Behrens
Remove btrfsctl, btrfs-show and btrfs-vol from all target of Makefile. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- Makefile |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index aaf1381..79e7a56 100644 --- a/Makefile +++ b/Makefile

Re: Help with recover data

2012-06-04 Thread Stefan Behrens
What have you done? Why do you need to recover data? What happened? A power failure? A kernel crash? On Tue, 29 May 2012 18:14:53 -0400, Maxim Mikheev wrote: I recently decided to use btrfs. It works perfectly for a week even under heavy load. Yesterday I destroyed backups as cannot afford to

Re: Help with recover data

2012-06-04 Thread Stefan Behrens
On Mon, 04 Jun 2012 08:26:43 -0400, Maxim Mikheev wrote: It was a kernel panic from btrfs. I had around 40 parallel processes of reading/writing. Do you have a stack trace for this kernel panic, something with the term BUG, WARNING and/or Call Trace in /var/log/kern.log or /var/log/syslog (or

Re: Help with recover data

2012-06-04 Thread Stefan Behrens
On Mon, 04 Jun 2012 10:08:54 -0400, Maxim Mikheev wrote: Disks were connected to RocketRaid 2760 directly as JBOD. There is no LVM, MD or encryption. I used plain disks directly. The file system was 55% full (1.7TB from 3TB for each disk). Logs are attached. The error happens at May 29,

Re: Help with recover data

2012-06-04 Thread Stefan Behrens
On Mon, 04 Jun 2012 11:08:36 -0400, Maxim Mikheev wrote: How can I send this file to the mailing list? Using web space, e.g. http://pastebin.com/ -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at

[PATCH v5 2/3] Btrfs: add ioctl to get and reset the device stats

2012-05-25 Thread Stefan Behrens
An ioctl interface is added to get the device statistic counters. A second ioctl is added to atomically get and reset these counters. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/ioctl.c | 26 ++ fs/btrfs/ioctl.h | 14 ++ fs

[PATCH v5 3/3] Btrfs: read device stats on mount, write modified ones during commit

2012-05-25 Thread Stefan Behrens
The device statistics are written into the device tree with each transaction commit. Only modified statistics are written. When a filesystem is mounted, the device statistics for each involved device are read from the device tree and used to initialize the counters. Signed-off-by: Stefan Behrens

[PATCH v5 1/3] Btrfs: add device counters for detected IO and checksum errors

2012-05-25 Thread Stefan Behrens
. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/disk-io.c | 13 --- fs/btrfs/extent_io.c | 18 -- fs/btrfs/ioctl.h | 19 ++ fs/btrfs/scrub.c | 65 +- fs/btrfs/volumes.c | 94

[PATCH v5 0/3] Btrfs: add IO error device stats

2012-05-25 Thread Stefan Behrens
the counters. A patch for the btrfs-progs world will also be sent. Stefan Behrens (3): Btrfs: add device counters for detected IO and checksum errors Btrfs: add ioctl to get and reset the device stats Btrfs: read device stats on mount, write modified ones during commit fs/btrfs/ctree.h | 38

[PATCH v5 0/3] Btrfs-progs: support get/reset device stats via ioctl

2012-05-25 Thread Stefan Behrens
padding at end of ioctl structure Changes v4-v5: - The statistic members in the ioctl are now organized as an array of 64 bit values. Symbolic names for the array indexes are defined in an enum, which also defines the max value Stefan Behrens (3): Btrfs-progs: move open_file_or_dir

[PATCH v5 1/3] Btrfs-progs: move open_file_or_dir() to utils.c

2012-05-25 Thread Stefan Behrens
open_file_or_dir() makes use of the function dirfd(3), the required XOPEN version was raised from 6 to 7. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- Makefile |4 ++-- btrfsctl.c | 28 cmds-balance.c |1 + cmds-inspect.c |1

[PATCH v5 2/3] Btrfs-progs: make two utility functions globally available

2012-05-25 Thread Stefan Behrens
Two convenient utility functions that have so far been local to scrub are moved to utils.c. They will be used in the device stats code in a following commit. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- cmds-scrub.c | 72

[PATCH v5 3/3] Btrfs-progs: add command to get/reset device stats via ioctl

2012-05-25 Thread Stefan Behrens
btrfs device stats is used to retrieve and print the device stats. btrfs device stats -z is used to atomically retrieve, reset and print the stats. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- cmds-device.c | 118 ctree.h

Re: [PATCH v4 3/3] Btrfs: read device stats on mount, write modified ones during commit

2012-05-23 Thread Stefan Behrens
On Wed, 23 May 2012 09:29:12 +0800, Liu Bo wrote: On 05/22/2012 06:53 PM, Stefan Behrens wrote: The device statistics are written into the device tree with each transaction commit. Only modified statistics are written. When a filesystem is mounted, the device statistics for each involved

[PATCH] Btrfs: fix false positive in check-integrity on unmount

2012-05-23 Thread Stefan Behrens
During unmount, it could happen that the integrity checker printed a warning message attempt to free ... on umount which is not yet iodone which turned out to be a false positive. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/check-integrity.c |2 +- 1 file changed, 1

[PATCH v4 0/3] Btrfs: add IO error device stats

2012-05-22 Thread Stefan Behrens
the device tree and used to initialize the counters. A patch for the btrfs-progs world will also be sent. Stefan Behrens (3): Btrfs: add device counters for detected IO and checksum errors Btrfs: add ioctl to get and reset the device stats Btrfs: read device stats on mount, write modified ones

[PATCH v4 3/3] Btrfs: read device stats on mount, write modified ones during commit

2012-05-22 Thread Stefan Behrens
The device statistics are written into the device tree with each transaction commit. Only modified statistics are written. When a filesystem is mounted, the device statistics for each involved device are read from the device tree and used to initialize the counters. Signed-off-by: Stefan Behrens

[PATCH v4 2/3] Btrfs: add ioctl to get and reset the device stats

2012-05-22 Thread Stefan Behrens
An ioctl interface is added to get the device statistic counters. A second ioctl is added to atomically get and reset these counters. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/ioctl.c | 26 fs/btrfs/ioctl.h | 28 + fs

[PATCH v4 1/3] Btrfs: add device counters for detected IO and checksum errors

2012-05-22 Thread Stefan Behrens
. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/disk-io.c | 18 ++--- fs/btrfs/extent_io.c | 27 +-- fs/btrfs/scrub.c | 72 +++--- fs/btrfs/volumes.c | 61

[PATCH v4 2/3] Btrfs-progs: make two utility functions globally available

2012-05-22 Thread Stefan Behrens
Two convenient utility functions that have so far been local to scrub are moved to utils.c. They will be used in the device stats code in a following commit. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- cmds-scrub.c | 72

[PATCH v4 0/3] Btrfs-progs: support get/reset device stats via ioctl

2012-05-22 Thread Stefan Behrens
padding at end of ioctl structure Stefan Behrens (3): Btrfs-progs: move open_file_or_dir() to utils.c Btrfs-progs: make two utility functions globally available Btrfs-progs: add command to get/reset device stats via ioctl Makefile |4 +- btrfsctl.c | 28

[PATCH v4 1/3] Btrfs-progs: move open_file_or_dir() to utils.c

2012-05-22 Thread Stefan Behrens
open_file_or_dir() makes use of the function dirfd(3), the required XOPEN version was raised from 6 to 7. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- Makefile |4 ++-- btrfsctl.c | 28 cmds-balance.c |1 + cmds-inspect.c |1

[PATCH v4 3/3] Btrfs-progs: add command to get/reset device stats via ioctl

2012-05-22 Thread Stefan Behrens
btrfs device stats is used to retrieve and print the device stats. btrfs device stats -z is used to atomically retrieve, reset and print the stats. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- cmds-device.c | 113 ctree.h

Re: [PATCH 4/5] Btrfs: cancel the scrub when remounting a fs to ro

2012-05-21 Thread Stefan Behrens
On Mon, 21 May 2012 13:34:05 +0800, Miao Xie wrote: On Fri, 18 May 2012 14:52:07 +0200, David Sterba wrote: On Thu, May 17, 2012 at 07:58:21PM +0800, Miao Xie wrote: --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -1151,6 +1151,8 @@ static int btrfs_remount(struct super_block *sb, int

Re: [PATCH v3 3/3] Btrfs: read device stats on mount, write modified ones during commit

2012-05-21 Thread Stefan Behrens
On Fri, 18 May 2012 13:57:19 +0200, David Sterba wrote: On Wed, May 16, 2012 at 06:50:47PM +0200, Stefan Behrens wrote: --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -823,6 +823,26 @@ struct btrfs_csum_item { u8 csum; } __attribute__ ((__packed__)); +struct

Re: [PATCH v3 0/3] Btrfs-progs: support get/reset device stats via ioctl

2012-05-17 Thread Stefan Behrens
-16 at 18:50 +0200, Stefan Behrens wrote: btrfs device stats is used to retrieve and print the device stats. btrfs device stats -z is used to atomically retrieve, reset and print the stats. In case of disk errors, it is recommended to run scrub on that disk. It checks the in-use disk contents

Re: [PATCH v3 3/3] Btrfs: read device stats on mount, write modified ones during commit

2012-05-17 Thread Stefan Behrens
On 05/17/2012 03:52, Liu Bo wrote: On 05/17/2012 12:50 AM, Stefan Behrens wrote: The device statistics are written into the device tree with each transaction commit. Only modified statistics are written. When a filesystem is mounted, the device statistics for each involved device are read from

[PATCH v3 1/3] Btrfs: add device counters for detected IO and checksum errors

2012-05-16 Thread Stefan Behrens
. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/disk-io.c | 18 ++--- fs/btrfs/extent_io.c | 27 +-- fs/btrfs/scrub.c | 72 +++--- fs/btrfs/volumes.c | 61

[PATCH v3 2/3] Btrfs-progs: make two utility functions globally available

2012-05-16 Thread Stefan Behrens
Two convenient utility functions that have so far been local to scrub are moved to utils.c. They will be used in the device stats code in a following commit. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- cmds-scrub.c | 72

[PATCH v3 3/3] Btrfs-progs: add command to get/reset device stats via ioctl

2012-05-16 Thread Stefan Behrens
btrfs device stats is used to retrieve and print the device stats. btrfs device stats -z is used to atomically retrieve, reset and print the stats. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- cmds-device.c | 113 ctree.h

[PATCH v3 0/3] Btrfs-progs: support get/reset device stats via ioctl

2012-05-16 Thread Stefan Behrens
a verbose printf() - Cast u64 to unsigned long long for printf() - Update the man page Changes v2-v3: - Rebase on Chris' current master branch - Split the patch into three seperate patches because after rebasing, open_file_or_dir() was moved and additional changes had been necessary Stefan Behrens (3

[RESEND PATCH] Btrfs: set ioprio of scrub readahead to idle

2012-05-16 Thread Stefan Behrens
Reduce ioprio class of scrub readahead threads to idle priority. This setting is fixed. This priority has shown the best performance during all measurements. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/ctree.h |3 +++ fs/btrfs/reada.c |5 + 2 files changed, 8

[PATCH v3 1/3] Btrfs-progs: move open_file_or_dir() to utils.c

2012-05-16 Thread Stefan Behrens
open_file_or_dir() makes use of the function dirfd(3), the required XOPEN version was raised from 6 to 7. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- Makefile |4 ++-- btrfsctl.c | 28 cmds-balance.c |1 + cmds-inspect.c |1

[PATCH v2] Btrfs-progs: make scrub IO priority configurable

2012-05-16 Thread Stefan Behrens
is a seperate patch, this needs to be done in the kernel. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- Changes v1-v2: - Rebase on Chris' current master branch cmds-scrub.c | 40 +--- man/btrfs.8.in | 23 ++- 2 files changed, 55

[BUG] sleeping function called from atomic context

2012-05-04 Thread Stefan Behrens
Looks like after btrfs read error corrected of chunk tree block while reading the chunk tree in open_ctree(), we stay in atomic state (in 3.4-rc5). The steps: # mkfs.btrfs -d raid1 -m raid1 /dev/sdv /dev/sdw /dev/sdi # mount /dev/sdv /mnt fill /mnt to 25% full # umount /mnt disconnect /dev/sdw #

Re: [BUG] sleeping function called from atomic context

2012-05-04 Thread Stefan Behrens
On 5/4/2012 3:25 PM, Chris Mason wrote: On Fri, May 04, 2012 at 12:18:51PM +0200, Stefan Behrens wrote: Looks like after btrfs read error corrected of chunk tree block while reading the chunk tree in open_ctree(), we stay in atomic state (in 3.4-rc5). I'm having a hard time reproducing

[PATCH] Btrfs: fix crash in scrub repair code when device is missing

2012-05-03 Thread Stefan Behrens
Fix that when scrub tries to repair an I/O or checksum error and one of the devices containing the mirror is missing, it crashes in bio_add_page because the bdev is a NULL pointer for missing devices. Reported-by: Marco L. Crociani marco.croci...@gmail.com Signed-off-by: Stefan Behrens sbehr

Re: Errors in rebalancing RAID1 array after disk failure.

2012-05-02 Thread Stefan Behrens
28fa74661f7a0e209a826e212b40d667516f5d1f Mon Sep 17 00:00:00 2001 From: Stefan Behrens sbehr...@giantdisaster.de Date: Wed, 2 May 2012 18:49:57 +0200 Subject: [PATCH] Btrfs: fix crash in scrub correction code when device is missing When scrub tries to fix an I/O or checksum error and one of the devices containing

Re: Errors in rebalancing RAID1 array after disk failure.

2012-05-02 Thread Stefan Behrens
Oops, please scratch the attachment of the mail before, that patch is not yet finished. I forgot to remove it before hitting the send button :( Sorry. I'll send a patch tomorrow to prevent the scrub crash in this situation. -- To unsubscribe from this list: send the line unsubscribe linux-btrfs

[PATCH] Btrfs: swap order of two spinlocks (lockdep complains)

2012-04-24 Thread Stefan Behrens
(), the space_info lock is the outer lock, therefore the locking order in update_global_block_rsv() is changed. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/extent-tree.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs

Re: Btrfs Array Recovery

2012-04-13 Thread Stefan Behrens
On 4/12/2012 11:25 PM, Travis Shivers wrote: A few months ago, my btrfs storage array became corrupted because of a power failure. A while ago, I made this thread to try and resolve the problem. (http://www.digipedia.pl/usenet/thread/11904/15955/) You can find detailed information about the

[PATCH v2] Btrfs: change integrity checker to support big blocks

2012-04-12 Thread Stefan Behrens
The integrity checker used to be coded for nodesize == leafsize == sectorsize == PAGE_CACHE_SIZE. This is now changed to support sizes for nodesize and leafsize which are N * PAGE_CACHE_SIZE. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- Change v1-v2: - Cast PAGE_CACHE_SIZE

[PATCH] Btrfs: fix that check_int_data mount option was ignored

2012-03-30 Thread Stefan Behrens
of the bitfield member is lost), the bit limit was removed entirely. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- The patch is based on cmason/integration as of 3/30/2012. fs/btrfs/ctree.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/btrfs/ctree.h b/fs

[PATCH] Btrfs: don't count CRC or header errors twice while scrubbing

2012-03-30 Thread Stefan Behrens
Each CRC or header error was counted twice, this is now fixed. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- The patch is based on cmason/integration as of 3/30/2012. fs/btrfs/scrub.c | 15 --- 1 files changed, 0 insertions(+), 15 deletions(-) diff --git a/fs/btrfs

[PATCH 1/3] Btrfs: introduce common define for max number of mirrors

2012-03-23 Thread Stefan Behrens
Readahead already has a define for the max number of mirrors. Scrub needs such a define now, the rest of the code will need something like this soon. Therefore the define was added to ctree.h and removed from the readahead code. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs

[PATCH 0/3] Btrfs: change scrub to support big blocks

2012-03-23 Thread Stefan Behrens
. Stefan Behrens (3): Btrfs: introduce common define for max number of mirrors Btrfs: minor cleanup in scrub Btrfs: change scrub to support big blocks fs/btrfs/ctree.h |2 + fs/btrfs/reada.c | 10 +- fs/btrfs/scrub.c | 1380 -- 3

[PATCH 2/3] Btrfs: minor cleanup in scrub

2012-03-23 Thread Stefan Behrens
Just a minor cleanup commit in preparation for the big block changes. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/scrub.c | 61 ++--- 1 files changed, 25 insertions(+), 36 deletions(-) diff --git a/fs/btrfs/scrub.c b/fs

Re: [patch 35/35] btrfs: disallow unequal data/metadata blocksize for mixed block groups

2012-03-22 Thread Stefan Behrens
On 3/22/2012 2:11 AM, Jeff Mahoney wrote: With support for bigger metadata blocks, we must avoid mounting a filesystem with different block size for mixed block groups, this causes corruption (found by xfstests/083). Signed-off-by: David Sterba dste...@suse.cz --- fs/btrfs/disk-io.c |

[PATCH] Btrfs: fix btrfs_ioctl_dev_info() crash on missing device

2012-03-19 Thread Stefan Behrens
When a filesystem is mounted with the degraded option, it is possible that some of the devices are not there. btrfs_ioctl_dev_info() crashs in this case because the device name is a NULL pointer. This ioctl was only used for scrub. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs

[PATCH] Btrfs: fix scrub statistics report

2012-02-10 Thread Stefan Behrens
Fixed that errors had been counted multiple times. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/ioctl.h | 30 -- fs/btrfs/scrub.c | 115 -- 2 files changed, 85 insertions(+), 60 deletions(-) diff --git

[PATCH] Btrfs-progs: make scrub IO priority configurable

2012-02-06 Thread Stefan Behrens
not improve from the modified IO priority. The only effect on SSDs is that it is now possible to control the amount of IO time slice spent for scrub. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- btrfs.c|8 ++-- man/btrfs.8.in | 21 + scrub.c

[PATCH] Btrfs: set ioprio of scrub readahead to idle

2012-02-06 Thread Stefan Behrens
Reduce ioprio class of scrub readahead threads to idle priority. This setting is fixed. This priority has shown the best performance during all measurements. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/ctree.h |3 +++ fs/btrfs/reada.c |5 + 2 files changed, 8

Re: Will BTRFS repair or restore data if corrupted?

2012-01-26 Thread Stefan Behrens
On 1/26/2012 9:59 AM, Hugo Mills wrote: On Thu, Jan 26, 2012 at 12:27:57AM +0100, Waxhead wrote: [...] Will BTRFS try to repair the corrupt data or will it simply silently restore the data without the user knowing that a file has been fixed? No, it'll just return the good copy and report

[PATCH] Btrfs: fix warning for 32-bit build of fs/btrfs/check-integrity.c

2012-01-24 Thread Stefan Behrens
There have been 4 warnings on 32-bit build, they are herewith fixed. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/check-integrity.c | 11 ++- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/check-integrity.c b/fs/btrfs/check-integrity.c

[RESEND] [PATCH v2] Btrfs: runtime integrity check tool

2011-12-22 Thread Stefan Behrens
. In most cases, unless you are a btrfs developer who needs to verify the integrity of (super)-block write requests, do not enable the config option BTRFS_FS_CHECK_INTEGRITY to include and compile the integrity check tool. The patches are based on Chris Mason's v3.1-182-gd85c8a6. Stefan Behrens (4

[PATCH v2 0/3] Btrfs: add IO error device stats

2011-12-21 Thread Stefan Behrens
. The patches are based on v3.1-182-gd85c8a6. Stefan Behrens (3): Btrfs: add device counters for detected IO and checksum errors Btrfs: add ioctl to get and reset the device stats Btrfs: read device stats on mount, write modified ones during commit fs/btrfs/ctree.h | 51 fs/btrfs

[PATCH v2 3/3] Btrfs: read device stats on mount, write modified ones during commit

2011-12-21 Thread Stefan Behrens
The device statistics are written into the device tree with each transaction commit. Only modified statistics are written. When a filesystem is mounted, the device statistics for each involved device are read from the device tree and used to initialize the counters. Signed-off-by: Stefan Behrens

[PATCH v2 2/3] Btrfs: add ioctl to get and reset the device stats

2011-12-21 Thread Stefan Behrens
An ioctl interface is added to get the device statistic counters. A second ioctl is added to atomically get and reset these counters. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/ioctl.c | 26 +++ fs/btrfs/ioctl.h | 27 fs

[PATCH v2 1/3] Btrfs: add device counters for detected IO and checksum errors

2011-12-21 Thread Stefan Behrens
. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/disk-io.c | 18 +++--- fs/btrfs/extent_io.c | 27 - fs/btrfs/scrub.c | 52 +++--- fs/btrfs/volumes.c | 61

[PATCH v2] Btrfs-progs: add command to get/reset device stats via ioctl

2011-12-21 Thread Stefan Behrens
btrfs device stats is used to retrieve and print the device stats. btrfs device stats -z is used to atomically retrieve, reset and print the stats. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- Changes v1-v2: - Remove a verbose printf() - Cast u64 to unsigned long long for printf

[PATCH v2 3/4] Btrfs: Makefile changes to optionally include btrfs integrity check

2011-12-21 Thread Stefan Behrens
If the btrfs integrity check is enabled, the files required to implement the checks are included in the build. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/Makefile |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/fs/btrfs/Makefile b/fs/btrfs

[PATCH v2 4/4] Btrfs: integrate integrity check module into btrfs

2011-12-21 Thread Stefan Behrens
on mount and umount, respectively. Add hook to call btrfs integrity check code version of submit_bh/submit_bio. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/ctree.h |8 +++- fs/btrfs/disk-io.c | 26 -- fs/btrfs/extent_io.c |5

[PATCH v2 2/4] Btrfs: add config option to enable btrfs integrity check

2011-12-21 Thread Stefan Behrens
Added the BTRFS_FS_CHECK_INTEGRITY option to Kconfig. It depends on BTRFS_FS. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/Kconfig | 19 +++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/fs/btrfs/Kconfig b/fs/btrfs/Kconfig index ecb9fd3

[PATCH v2 0/4] Btrfs: runtime integrity check tool

2011-12-21 Thread Stefan Behrens
use. In most cases, unless you are a btrfs developer who needs to verify the integrity of (super)-block write requests, do not enable the config option BTRFS_FS_CHECK_INTEGRITY to include and compile the integrity check tool. The patches are based on Chris Mason's v3.1-182-gd85c8a6. Stefan Behrens

Re: [PATCH 2/3] Btrfs: add ioctl to get and reset the device stats

2011-12-12 Thread Stefan Behrens
On 12/11/2011 11:24 AM, Goffredo Baroncelli wrote: On Friday, 09 December, 2011 17:40:27 Stefan Behrens wrote: An ioctl interface is added to get the device statistic counters. A second ioctl is added to atomically get and reset these counters. [...] +static long

[PATCH] Btrfs-progs: add command to get/reset device stats via ioctl

2011-12-09 Thread Stefan Behrens
btrfs device stats is used to retrieve and print the device stats. btrfs device stats -z is used atomically retrieve, reset and print the stats. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- Makefile |4 +- btrfs.c |5 ++ btrfs_cmds.c | 67

[PATCH 0/3] Btrfs: add IO error device stats

2011-12-09 Thread Stefan Behrens
statistic for each involved device are read from the device tree and used to initialize the counters. A patch for the btrfs-progs world will also be sent. The patches are based on v3.1-161-gf4a8e65 (btrfs pull request from 12/1/2011). Stefan Behrens (3): Btrfs: add device counters for detected IO

[PATCH 2/3] Btrfs: add ioctl to get and reset the device stats

2011-12-09 Thread Stefan Behrens
An ioctl interface is added to get the device statistic counters. A second ioctl is added to atomically get and reset these counters. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/ioctl.c | 26 +++ fs/btrfs/ioctl.h | 27 fs

[PATCH 1/3] Btrfs: add device counters for detected IO and checksum errors

2011-12-09 Thread Stefan Behrens
. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/disk-io.c | 18 +++--- fs/btrfs/extent_io.c | 27 - fs/btrfs/scrub.c | 52 +++--- fs/btrfs/volumes.c | 61

[PATCH 3/4] Btrfs: Makefile changes to optionally include btrfs integrity check

2011-11-09 Thread Stefan Behrens
If the btrfs integrity check is enabled, the files required to implement the checks are included in the build. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/Makefile |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/fs/btrfs/Makefile b/fs/btrfs

[PATCH 0/4] Btrfs: runtime integrity check tool

2011-11-09 Thread Stefan Behrens
BTRFS_FS_CHECK_INTEGRITY to include and compile the integrity check tool. The patches have been generated after a rebase to today's for-linus branch (v3.1-122-g7fd2ae2). Stefan Behrens (4): Btrfs: add optional integrity check code Btrfs: add config option to enable btrfs integrity check

[PATCH 4/4] Btrfs: integrate integrity check module into btrfs

2011-11-09 Thread Stefan Behrens
on mount and umount, respectively. Add hook to call btrfs integrity check code version of submit_bh/submit_bio. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/ctree.h |8 +++- fs/btrfs/disk-io.c | 26 -- fs/btrfs/extent_io.c |5

[PATCH 2/4] Btrfs: add config option to enable btrfs integrity check

2011-11-09 Thread Stefan Behrens
Added the BTRFS_FS_CHECK_INTEGRITY option to Kconfig. It depends on BTRFS_FS. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- fs/btrfs/Kconfig | 33 + 1 files changed, 33 insertions(+), 0 deletions(-) diff --git a/fs/btrfs/Kconfig b/fs/btrfs/Kconfig

Re: BTRFS and power loss ~= corruption?

2011-11-09 Thread Stefan Behrens
On 8/26/2011 1:01 AM, Gregory Maxwell wrote: On Wed, Aug 24, 2011 at 9:11 AM, Berend Dekens bt...@cyberwizzard.nl wrote: [snip] I thought the idea of COW was that whatever happens, you can always mount in a semi-consistent state? [snip] It seems to me that if someone created a block

Re: [PATCH 2/2] xfstests: meet btrfs fs size requirement in _scratch_mkfs_sized()

2011-11-04 Thread Stefan Behrens
On 11/4/2011 7:06 AM, Eryu Guan wrote: On Fri, Nov 4, 2011 at 1:39 PM, Christoph Hellwig h...@infradead.org wrote: On Fri, Nov 04, 2011 at 10:38:04AM +0800, Eryu Guan wrote: btrfs requires at least 256M file system size, so check 'fssize' in _scratch_mkfs_sized first and give it a proper

[PATCH v3 2/2] xfstests: make t_immutable and 079 filesystem-agnostic

2011-08-01 Thread Stefan Behrens
with _notrun. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- 079 | 12 +++-- src/t_immutable.c | 66 +--- 2 files changed, 31 insertions(+), 47 deletions(-) diff --git a/079 b/079 index 6c43fe7..8f6e179 100755

[PATCH v3 1/2] xfstests: make more tests generic

2011-08-01 Thread Stefan Behrens
Use _scratch_mkfs / _scratch_mkfs_sized instead of _scratch_mkfs_xfs where possible. Execute 015, 062, 083, 117, 120 and 192 for all filesystems, these tests used to be XFS specific. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- 015 |5 +++-- 062 |4 ++-- 062.out

[PATCH 2/4] xfstests: Add support for btrfs in 083, 117, 120 and 192

2011-07-28 Thread Stefan Behrens
Added btrfs to the list of supported filesystems for tests 083, 117, 120 and 192. For test 083 also changed to use _scratch_mkfs_sized instead of _scratch_mks_xfs for all filesystem types except for XFS. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- 083 | 12 +--- 117

[PATCH 1/4] xfstests: Add support for btrfs in 062

2011-07-28 Thread Stefan Behrens
Added btrfs to the list of supported filesystems for this test. Remove output of mkfs since this is specific to mkfs.xfs and now filtered out. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- 062 |4 ++-- 062.out |6 -- 2 files changed, 2 insertions(+), 8 deletions

[PATCH 3/4] xfstests: Add support for btrfs in 015

2011-07-28 Thread Stefan Behrens
-by: Stefan Behrens sbehr...@giantdisaster.de --- 015 | 11 --- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/015 b/015 index 8f2be7c..7020e67 100755 --- a/015 +++ b/015 @@ -48,13 +48,13 @@ _free() } # real QA test starts here -_supported_fs xfs +_supported_fs xfs btrfs

[PATCH 4/4] xfstests: Add support for btrfs in 079

2011-07-28 Thread Stefan Behrens
(), share the code branch for the ext2 case also for the btrfs case. Furthermore, added missing call to ioctl(FS_IOC_GETFLAGS) to the ext3 and btrfs code branch, this was a difference to the way the XFS code branch was implemented. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- 079

[PATCH 0/4] xfstests: Add support for btrfs in a couple of xfstests

2011-07-28 Thread Stefan Behrens
Added btrfs to the list of supported filesystems for tests 015, 062, 079, 083, 117, 120 and 192. For test 079 to run, src/t_immutable.c was also modified (for ext2 and btrfs filesystems). Stefan Behrens (4): xfstests: Add support for btrfs in 062 xfstests: Add support for btrfs in 083, 117

Re: [PATCH 1/4] xfstests: Add support for btrfs in 062

2011-07-28 Thread Stefan Behrens
On 7/28/2011 10:45 AM, Christoph Hellwig wrote: On Thu, Jul 28, 2011 at 10:27:58AM +0200, Stefan Behrens wrote: Added btrfs to the list of supported filesystems for this test. Remove output of mkfs since this is specific to mkfs.xfs and now filtered out. Why can't it be generic? Any reason

Re: [PATCH 3/4] xfstests: Add support for btrfs in 015

2011-07-28 Thread Stefan Behrens
On 7/28/2011 10:47 AM, Christoph Hellwig wrote: On Thu, Jul 28, 2011 at 10:28:00AM +0200, Stefan Behrens wrote: Added btrfs to the list of supported filesystems for test 015, and increased free space reporting tolerance to 10% for btrfs. Replaced the call to _scratch_mkfs_xfs with the XFS

<    1   2   3   4   5