[PATCH] Btrfs: fail device statistic reset on read-only filesystem

2013-10-11 Thread Stefan Behrens
Currently the attempt to reset the device statistics with 'btrfs device stat -z ...' on read-only filesystems does not return an error. The statistics that are hold in main memory are reset but the statistics that are stored in the filesystem are not reset. Fix it by returning EROFS in this case.

Re: [PATCH] Btrfs: fail device statistic reset on read-only filesystem

2013-10-11 Thread Josef Bacik
On Fri, Oct 11, 2013 at 02:18:23PM +0200, Stefan Behrens wrote: Currently the attempt to reset the device statistics with 'btrfs device stat -z ...' on read-only filesystems does not return an error. The statistics that are hold in main memory are reset but the statistics that are stored in

Re: [PATCH] Btrfs: fail device statistic reset on read-only filesystem

2013-10-11 Thread Stefan Behrens
On Fri, 11 Oct 2013 09:47:33 -0400, Josef Bacik wrote: Hey look something else that should go into xfstests, I don't think so. It's a bug that is there from the very beginning, not a regression. We can't catch all possible errors (non-regressions) with xfstests. We would spend all time for