Re: [BUG] atime on ro snapshots is updated when it should not

2012-05-25 Thread Alexander Block
David just pointed me to the update_time patches from Josef. When these get into the kernel, the RO snapshot + atime problem could be easily fixed. Any idea when those get into the kernel? On Thu, May 24, 2012 at 7:12 PM, Alexander Block abloc...@googlemail.com wrote: Hello, if a snapshot was

[PATCH] Btrfs: don't update atime on RO subvolumes

2012-05-25 Thread Alexander Block
Before the update_time inode operation was indroduced, it was not possible to prevent updates of atime on RO subvolumes. btrfs_update_time does now check if the root is RO and skip updating of atime. This patch requires the update_time patches from Josef Bacik. Signed-off-by: Alexander Block

[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 ++

[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
The goal is to detect when drives start to get an increased error rate, when drives should be replaced soon. Therefore statistic counters are added that count IO errors (read, write and flush). Additionally, the software detected errors like checksum errors and corrupted blocks are counted.

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

2012-05-25 Thread Stefan Behrens
Changes v1-v2: - Remove restriction that BTRFS_IOC_GET_DEVICE_STATS is a privileged operation - Cast u64 to unsigned long long for printf() Changes v2-v3: - Rebased on Chris' current master Changes v3-v4: - Add padding at end of ioctl structure Changes v4-v5: - The statistic members in the

[PATCH v5 0/3] Btrfs-progs: support 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. In order to share two utility functions between scrub and the dev stats code, these two functions are moved to utils.c and renamed. Since these

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

2012-05-25 Thread Stefan Behrens
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 to share some common code between scrub and the device stats in the following step. That common code uses open_file_or_dir(). Since

[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

[PATCH] Btrfs: convert the inode bit field to use the actual bit operations

2012-05-25 Thread Josef Bacik
Miao pointed this out while I was working on an orphan problem that messing with a bitfield where different ranges are protected by different locks doesn't work out right. Turns out we've been doing this forever where we have different parts of the bit field protected by either no lock at all or

[PATCH] Btrfs: fix how we deal with the orphan block rsv

2012-05-25 Thread Josef Bacik
Ceph was hitting this race where we would remove an inode from the per-root orphan list before we would release the space we had reserved for the inode. We actually don't need a list or anything, we just need to make sure the root doesn't try to free up the orphan reserve until after the inodes

[PATCH] Btrfs: fall back to non-inline if we don't have enough space

2012-05-25 Thread Josef Bacik
If cow_file_range_inline fails with ENOSPC we abort the transaction which isn't very nice. This really shouldn't be happening anyways but there's no sense in making it a horrible error when we can easily just go allocate normal data space for this stuff. Thanks, Signed-off-by: Josef Bacik

The linux-joystick mailing list has been moved

2012-05-25 Thread Martin Mares
The linux-joystick mailing list has been superseded by the linux-input list run at vger.kernel.org. See http://vger.kernel.org/vger-lists.html for information on the new list server (or consult your local oracle). Yours virtually, Martin

Btrfs, snapshots and atime problems

2012-05-25 Thread Alexander Block
Hello, I would like to start a discussion on atime in Btrfs (and possibly other filesystems with snapshot support). As atime is updated on every access of a file or directory, we get many changes to the trees in btrfs that as always trigger cow operations. This is no problem as long as the

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

2012-05-25 Thread Christoph Hellwig
Can you explain why the device error counters should be in a filesystem instead of generic block layer code? On Fri, May 25, 2012 at 04:06:07PM +0200, Stefan Behrens wrote: Changes v1-v2: - Remove restriction that BTRFS_IOC_GET_DEVICE_STATS is a privileged operation - Cast u64 to unsigned

Re: Btrfs, snapshots and atime problems

2012-05-25 Thread Alexander Block
On Fri, May 25, 2012 at 5:15 PM, Alexander Block abloc...@googlemail.com wrote: Hello, I would like to start a discussion on atime in Btrfs (and possibly other filesystems with snapshot support). As atime is updated on every access of a file or directory, we get many changes to the trees in

atime and filesystems with snapshots (especially Btrfs)

2012-05-25 Thread Alexander Block
Hello, (this is a resend with proper CC for linux-fsdevel and linux-kernel) I would like to start a discussion on atime in Btrfs (and other filesystems with snapshot support). As atime is updated on every access of a file or directory, we get many changes to the trees in btrfs that as always

Re: atime and filesystems with snapshots (especially Btrfs)

2012-05-25 Thread Josef Bacik
On Fri, May 25, 2012 at 05:35:37PM +0200, Alexander Block wrote: Hello, (this is a resend with proper CC for linux-fsdevel and linux-kernel) I would like to start a discussion on atime in Btrfs (and other filesystems with snapshot support). As atime is updated on every access of a file

Re: atime and filesystems with snapshots (especially Btrfs)

2012-05-25 Thread Alexander Block
On Fri, May 25, 2012 at 5:42 PM, Josef Bacik jo...@redhat.com wrote: On Fri, May 25, 2012 at 05:35:37PM +0200, Alexander Block wrote: Hello, (this is a resend with proper CC for linux-fsdevel and linux-kernel) I would like to start a discussion on atime in Btrfs (and other filesystems with

Re: atime and filesystems with snapshots (especially Btrfs)

2012-05-25 Thread Alexander Block
On Fri, May 25, 2012 at 6:28 PM, Andreas Dilger adil...@dilger.ca wrote: On 2012-05-25, at 9:59, Alexander Block abloc...@googlemail.com wrote: Are you talking about the atime for the primary copy, or the atime for the snapshots?  IMHO, the atime should not be updated for a snapshot unless it

Re: atime and filesystems with snapshots (especially Btrfs)

2012-05-25 Thread Alexander Block
On Fri, May 25, 2012 at 6:32 PM, Freddie Cash fjwc...@gmail.com wrote: On May 25, 2012 9:00 AM, Alexander Block abloc...@googlemail.com wrote: On Fri, May 25, 2012 at 5:42 PM, Josef Bacik jo...@redhat.com wrote: On Fri, May 25, 2012 at 05:35:37PM +0200, Alexander Block wrote: Hello,

Re: atime and filesystems with snapshots (especially Btrfs)

2012-05-25 Thread Andreas Dilger
On 2012-05-25, at 9:59, Alexander Block abloc...@googlemail.com wrote: On Fri, May 25, 2012 at 5:42 PM, Josef Bacik jo...@redhat.com wrote: On Fri, May 25, 2012 at 05:35:37PM +0200, Alexander Block wrote: Hello, (this is a resend with proper CC for linux-fsdevel and linux-kernel) I would

Re: Btrfs, snapshots and atime problems

2012-05-25 Thread cwillu
On Fri, May 25, 2012 at 9:25 AM, Alexander Block abloc...@googlemail.com wrote: On Fri, May 25, 2012 at 5:15 PM, Alexander Block abloc...@googlemail.com wrote: Hello, I would like to start a discussion on atime in Btrfs (and possibly other filesystems with snapshot support). As atime is

Re: atime and filesystems with snapshots (especially Btrfs)

2012-05-25 Thread Alexander Block
On Fri, May 25, 2012 at 5:35 PM, Alexander Block abloc...@googlemail.com wrote: Hello, (this is a resend with proper CC for linux-fsdevel and linux-kernel) I would like to start a discussion on atime in Btrfs (and other filesystems with snapshot support). As atime is updated on every

Re: atime and filesystems with snapshots (especially Btrfs)

2012-05-25 Thread Peter Maloney
On 05/25/2012 09:10 PM, Alexander Block wrote: Just to show some numbers I made a simple test on a fresh btrfs fs. I copied my hosts /usr (4 gig) folder to that fs and checked metadata usage with btrfs fi df /mnt, which was around 300m. Then I created 10 snapshots and checked metadata usage

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

2012-05-25 Thread Arne Jansen
On 05/25/12 19:49, Stefan Behrens wrote: It would be helpful if already the generic block layer would offer device error counters. Then btrfs could read them, add own counters for its checksum detected errors, and store everything persistently in the filesystem. I take it that you not only

Re: atime and filesystems with snapshots (especially Btrfs)

2012-05-25 Thread Alexander Block
On Fri, May 25, 2012 at 10:27 PM, Peter Maloney peter.malo...@brockmann-consult.de wrote: On 05/25/2012 09:10 PM, Alexander Block wrote: Just to show some numbers I made a simple test on a fresh btrfs fs. I copied my hosts /usr (4 gig) folder to that fs and checked metadata usage with btrfs fi

Re: atime and filesystems with snapshots (especially Btrfs)

2012-05-25 Thread Alexander Block
On Fri, May 25, 2012 at 10:42 PM, Alexander Block abloc...@googlemail.com wrote: On Fri, May 25, 2012 at 10:27 PM, Peter Maloney peter.malo...@brockmann-consult.de wrote: On 05/25/2012 09:10 PM, Alexander Block wrote: Just to show some numbers I made a simple test on a fresh btrfs fs. I

Re: [PATCH] btrfs: fixup module.h usage as required

2012-05-25 Thread Paul Gortmaker
Hi Chris, This fairly trivial patch missed the 3.4 merge window: http://lkml.indiana.edu/hypermail/linux/kernel/1202.3/00764.html Do you have it queued for the 3.5 merge window now in play, or would you rather I push the changeset myself directly? Thanks, Paul. -- To unsubscribe from this