Re: [RFC v2] Improve subvolume usability for a normal user

2017-12-10 Thread ein
And also, how to prevent creation of the snapshots by the user. On 12/11/2017 08:30 AM, ein wrote: > On 12/11/2017 07:38 AM, Misono, Tomohiro wrote: >> - Change the default behavior to allow a user to delete subvolume which is >> empty > From sysadmin point of view I think it's worth considering

Re: [RFC v2] Improve subvolume usability for a normal user

2017-12-10 Thread ein
On 12/11/2017 07:38 AM, Misono, Tomohiro wrote: > - Change the default behavior to allow a user to delete subvolume which is > empty >From sysadmin point of view I think it's worth considering the following scenario(s): what if admin wants one persistent snapshot undeletable by the user? -

[RFC v2] Improve subvolume usability for a normal user

2017-12-10 Thread Misono, Tomohiro
Hello all, I reflected the comments of the first version of the RFC[1]. Thanks for all those who commented. The summary of updated proposal is: - Change the default behavior to allow a user to delete subvolume which is empty - Add 2 new non-root ioctls to get subvolume/quota info under the

Re: defragmenting best practice?

2017-12-10 Thread Timofey Titovets
2017-12-11 8:18 GMT+03:00 Dave : > On Tue, Oct 31, 2017 someone wrote: >> >> >> > 2. Put $HOME/.cache on a separate BTRFS subvolume that is mounted >> > nocow -- it will NOT be snapshotted > > I did exactly this. It servers the purpose of avoiding snapshots. > However,

Re: defragmenting best practice?

2017-12-10 Thread Dave
On Tue, Oct 31, 2017 someone wrote: > > > > 2. Put $HOME/.cache on a separate BTRFS subvolume that is mounted > > nocow -- it will NOT be snapshotted I did exactly this. It servers the purpose of avoiding snapshots. However, today I saw the following at https://wiki.archlinux.org/index.php/Btrfs

Re: [PATCH v4 72/73] xfs: Convert mru cache to XArray

2017-12-10 Thread Matthew Wilcox
On Mon, Dec 11, 2017 at 10:57:45AM +1100, Dave Chinner wrote: > i.e. the fact the cmpxchg failed may not have anything to do with a > race condtion - it failed because the slot wasn't empty like we > expected it to be. There can be any number of reasons the slot isn't > empty - the API should not

Ref doesn't match the record start and is compressed

2017-12-10 Thread Kai Krakow
Hello! Since my system was temporarily overloaded (load 500+ for probably several hours but it recovered, no reboot needed), I'm seeing btrfs-related backtraces in dmesg with the fs going RO. I tried to fix it but it fails: > Fixed 0 roots. > checking extents > ref mismatch on [3043919785984

Re: ERROR: failed to repair root items: Input/output error

2017-12-10 Thread Duncan
Tomasz Pala posted on Sun, 10 Dec 2017 16:38:05 +0100 as excerpted: > On Sun, Dec 10, 2017 at 15:18:32 +, constantine wrote: > >> I have a laptop root hard drive (Samsung SSD 850 EVO 1TB), which is >> within warranty. >> I can't mount it read-write ("no rw mounting after error"). > > There

Re: exclusive subvolume space missing

2017-12-10 Thread Qu Wenruo
On 2017年12月11日 07:44, Qu Wenruo wrote: > > > On 2017年12月10日 19:27, Tomasz Pala wrote: >> On Mon, Dec 04, 2017 at 08:34:28 +0800, Qu Wenruo wrote: >> 1. is there any switch resulting in 'defrag only exclusive data'? >>> >>> IIRC, no. >> >> I have found a directory - pam_abl databases,

Re: [PATCH v4 72/73] xfs: Convert mru cache to XArray

2017-12-10 Thread Dave Chinner
On Fri, Dec 08, 2017 at 03:01:31PM -0800, Matthew Wilcox wrote: > On Thu, Dec 07, 2017 at 11:38:43AM +1100, Dave Chinner wrote: > > > > cmpxchg is for replacing a known object in a store - it's not really > > > > intended for doing initial inserts after a lookup tells us there is > > > > nothing

Re: Chunk-Recovery fails with alignment error

2017-12-10 Thread Qu Wenruo
On 2017年12月11日 05:16, Benjamin Beichler wrote: > The patch let the chunk-recover be successful. But I'm no lucky man, > the recovered chunk tree does not work or other metadata is also > broken. > > Mounting the system is not successful (dmesg): > BTRFS critical (device dm-0): corrupt node,

btrfs-progs: replace: error message can be improved when other operation is running

2017-12-10 Thread Lukas Pirl
Dear all, when trying to replace a device of a file system for which a balance is running, btrfs-progs fails with the error message: ERROR: ioctl(DEV_REPLACE_START) on '/mnt/xyz' returns error: This might also be true for alike operations, such as "add", "delete" and "resize", since those

Re: exclusive subvolume space missing

2017-12-10 Thread Qu Wenruo
On 2017年12月10日 19:27, Tomasz Pala wrote: > On Mon, Dec 04, 2017 at 08:34:28 +0800, Qu Wenruo wrote: > >>> 1. is there any switch resulting in 'defrag only exclusive data'? >> >> IIRC, no. > > I have found a directory - pam_abl databases, which occupy 10 MB (yes, > TEN MEGAbytes) and released

Re: Chunk-Recovery fails with alignment error

2017-12-10 Thread Qu Wenruo
On 2017年12月11日 05:16, Benjamin Beichler wrote: > The patch let the chunk-recover be successful. But I'm no lucky man, > the recovered chunk tree does not work or other metadata is also > broken. > > Mounting the system is not successful (dmesg): > BTRFS critical (device dm-0): corrupt node,

Just curious, whats happened with btrfs & rcu skiplist in 2013?

2017-12-10 Thread Timofey Titovets
Subj, I found that https://lwn.net/Articles/554885/, https://lwn.net/Articles/553047/ and some others messages like judy rcu & etc. But nothing after june 2013, just curious, may be some one know why that has been stalled? or just what happened in the end? (i.e. ex, RT guys, just said that too

Re: Chunk-Recovery fails with alignment error

2017-12-10 Thread Benjamin Beichler
The patch let the chunk-recover be successful. But I'm no lucky man, the recovered chunk tree does not work or other metadata is also broken. Mounting the system is not successful (dmesg): BTRFS critical (device dm-0): corrupt node, invalid item slot: block=16384, root=1, slot=0 BTRFS error

Re: exclusive subvolume space missing

2017-12-10 Thread Tomasz Pala
On Sun, Dec 10, 2017 at 12:27:38 +0100, Tomasz Pala wrote: > I have found a directory - pam_abl databases, which occupy 10 MB (yes, > TEN MEGAbytes) and released ...8.7 GB (almost NINE GIGAbytes) after # df Filesystem Size Used Avail Use% Mounted on /dev/sda264G 61G

Re: ERROR: failed to repair root items: Input/output error

2017-12-10 Thread Tomasz Pala
On Sun, Dec 10, 2017 at 15:18:32 +, constantine wrote: > I have a laptop root hard drive (Samsung SSD 850 EVO 1TB), which is > within warranty. > I can't mount it read-write ("no rw mounting after error"). There is a data-corruption issue with this controller! The same as 840 EVO - just

ERROR: failed to repair root items: Input/output error

2017-12-10 Thread constantine
I have a laptop root hard drive (Samsung SSD 850 EVO 1TB), which is within warranty. I can't mount it read-write ("no rw mounting after error"). The data are not really critical (I will overcome the shock of losing them within a couple of days). Btrfs check --repair throws an error: sudo btrfs

Re: exclusive subvolume space missing

2017-12-10 Thread Tomasz Pala
On Mon, Dec 04, 2017 at 08:34:28 +0800, Qu Wenruo wrote: >> 1. is there any switch resulting in 'defrag only exclusive data'? > > IIRC, no. I have found a directory - pam_abl databases, which occupy 10 MB (yes, TEN MEGAbytes) and released ...8.7 GB (almost NINE GIGAbytes) after defrag. After

Re: exclusive subvolume space missing

2017-12-10 Thread Tomasz Pala
On Sun, Dec 03, 2017 at 01:45:45 +, Duncan wrote: > OTOH, it's also quite possible that people chose btrfs at least partly > for other reasons, say the "storage pool" qualities, and would rather Well, to name some: 1. filesystem-level backups via snapshot/send/receive - much cleaner and

[PATCH v3 4/5] btrfs: cleanup device states define BTRFS_DEV_STATE_REPLACE_TGT

2017-12-10 Thread Anand Jain
Currently device state is being managed by each individual int variable such as struct btrfs_device::is_tgtdev_for_dev_replace. Instead of that declare btrfs_device::dev_state BTRFS_DEV_STATE_MISSING and use the bit operations. Signed-off-by: Anand Jain --- v3: Define

Re: [bug report] btrfs: cleanup device states define BTRFS_DEV_STATE_IN_FS_METADATA

2017-12-10 Thread Anand Jain
On 12/08/2017 07:08 PM, Dan Carpenter wrote: Hello Anand Jain, The patch 2dcfcdc43524: "btrfs: cleanup device states define BTRFS_DEV_STATE_IN_FS_METADATA" from Dec 4, 2017, leads to the following static checker warning: fs/btrfs/super.c:2007 btrfs_calc_avail_data_space()

[PATCH v3 3/5] btrfs: cleanup device states define BTRFS_DEV_STATE_MISSING

2017-12-10 Thread Anand Jain
Currently device state is being managed by each individual int variable such as struct btrfs_device::missing. Instead of that declare btrfs_device::dev_state BTRFS_DEV_STATE_MISSING and use the bit operations. Signed-off-by: Anand Jain Reviewed-by : Nikolay Borisov

[PATCH v3 0/5] define BTRFS_DEV_STATE

2017-12-10 Thread Anand Jain
As of now device properties and states are being represented as int variable, patches here makes them bit flags instead. Further, wip patches such as device failed state needs this cleanup. v2: Adds BTRFS_DEV_STATE_REPLACE_TGT Adds BTRFS_DEV_STATE_FLUSH_SENT Drops BTRFS_DEV_STATE_CAN_DISCARD

[PATCH v3 5/5] btrfs: cleanup device states define BTRFS_DEV_STATE_FLUSH_SENT

2017-12-10 Thread Anand Jain
Currently device state is being managed by each individual int variable such as struct btrfs_device::is_tgtdev_for_dev_replace. Instead of that declare btrfs_device::dev_state BTRFS_DEV_STATE_FLUSH_SENT and use the bit operations. Signed-off-by: Anand Jain --- v3: Define

[PATCH v3 2/5] btrfs: cleanup device states define BTRFS_DEV_STATE_IN_FS_METADATA

2017-12-10 Thread Anand Jain
Currently device state is being managed by each individual int variable such as struct btrfs_device::in_fs_metadata. Instead of that declare device state BTRFS_DEV_STATE_IN_FS_METADATA and use the bit operations. Signed-off-by: Anand Jain Reviewed-by: Nikolay Borisov

[PATCH v3 1/5] btrfs: cleanup device states define BTRFS_DEV_STATE_WRITEABLE

2017-12-10 Thread Anand Jain
Currently device state is being managed by each individual int variable such as struct btrfs_device::writeable. Instead of that declare device state BTRFS_DEV_STATE_WRITEABLE and use the bit operations. Signed-off-by: Anand Jain --- v2: Drop unrelated change to declare