Re: [PATCH v2 01/11] btrfs-progs: don't blindly assume crc32c in csum_tree_block_size()

2019-08-28 Thread Johannes Thumshirn
On 27/08/2019 18:36, David Sterba wrote: > On Tue, Aug 27, 2019 at 06:33:02PM +0200, David Sterba wrote: >> On Mon, Aug 26, 2019 at 01:48:43PM +0200, Johannes Thumshirn wrote: >>> The callers of csum_tree_block_size() blindly assume we're only having >>> crc32c as a possible checksum and thus pass

Re: [PATCH v2] btrfs-progs: add verbose option to btrfs device scan

2019-08-28 Thread Anand Jain
Ping? Thanks, Anand On 16/7/19 11:05 AM, Anand Jain wrote: To help debug device scan issues, add verbose option to btrfs device scan. Signed-off-by: Anand Jain --- v2: Use bool instead of int as a btrfs_scan_device() argument. cmds/device.c| 8 ++-- cmds/filesystem.c| 2 +

[PATCH 1/2] btrfs-progs: add BTRFS_DEV_ITEMS_OBJECTID in comment in print-tree

2019-08-28 Thread Anand Jain
So when searching for BTRFS_DEV_ITEMS_OBJECTID it hits. Albeit it is defined same as BTRFS_ROOT_TREE_OBJECTID. Signed-off-by: Anand Jain --- print-tree.c | 1 + 1 file changed, 1 insertion(+) diff --git a/print-tree.c b/print-tree.c index b31e515f8989..5832f3089e3d 100644 --- a/print-tree.c +++

[PATCH 2/2] btrfs-progs: print-tree add missing DEV_STATS

2019-08-28 Thread Anand Jain
Add missing BTRFS_DEV_STATS_OBJECTID into the print-tree. before: item 0 key (0 PERSISTENT_ITEM 1) itemoff 16243 itemsize 40 persistent item objectid 0 offset 1 after: item 0 key (DEV_STATS PERSISTENT_ITEM 1) itemoff 16243 itemsize 40 persistent item

Re: [RFC PATCH 5/5] Btrfs: add ioctl for directly writing compressed data

2019-08-28 Thread David Sterba
On Thu, Aug 15, 2019 at 02:04:06PM -0700, Omar Sandoval wrote: > #define BTRFS_IOC_SEND_32 _IOW(BTRFS_IOCTL_MAGIC, 38, \ > struct btrfs_ioctl_send_args_32) > + > +struct btrfs_ioctl_compressed_pwrite_args_32 { > + __u64 offset; /* in */ > + __u32 comp

Re: [PATCH 1/2] btrfs-progs: add BTRFS_DEV_ITEMS_OBJECTID in comment in print-tree

2019-08-28 Thread Nikolay Borisov
On 28.08.19 г. 12:56 ч., Anand Jain wrote: > So when searching for BTRFS_DEV_ITEMS_OBJECTID it hits. Albeit it is > defined same as BTRFS_ROOT_TREE_OBJECTID. > > Signed-off-by: Anand Jain > --- > print-tree.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/print-tree.c b/print-tree.

Re: [PATCH] btrfs: use percentage for fractions, replace helpers

2019-08-28 Thread David Sterba
On Tue, Aug 27, 2019 at 08:24:53PM +0200, David Sterba wrote: > The div_factor* helpers calculate fraction or percentual fraction. > There's a nice helper mult_frac that's for general fractions, we'll add > a local wrapper suited for our purposes and replace all instances of > div_factor and update

Re: [PATCH 1/2] btrfs-progs: add BTRFS_DEV_ITEMS_OBJECTID in comment in print-tree

2019-08-28 Thread David Sterba
On Wed, Aug 28, 2019 at 04:01:04PM +0300, Nikolay Borisov wrote: > > > On 28.08.19 г. 12:56 ч., Anand Jain wrote: > > So when searching for BTRFS_DEV_ITEMS_OBJECTID it hits. Albeit it is > > defined same as BTRFS_ROOT_TREE_OBJECTID. > > > > Signed-off-by: Anand Jain > > --- > > print-tree.c |

Re: [PATCH 1/2] btrfs-progs: add BTRFS_DEV_ITEMS_OBJECTID in comment in print-tree

2019-08-28 Thread Anand Jain
> On 28 Aug 2019, at 9:01 PM, Nikolay Borisov wrote: > > > > On 28.08.19 г. 12:56 ч., Anand Jain wrote: >> So when searching for BTRFS_DEV_ITEMS_OBJECTID it hits. Albeit it is >> defined same as BTRFS_ROOT_TREE_OBJECTID. >> >> Signed-off-by: Anand Jain >> --- >> print-tree.c | 1 + >> 1 fil

Re: [PATCH 1/2] btrfs-progs: add BTRFS_DEV_ITEMS_OBJECTID in comment in print-tree

2019-08-28 Thread Anand Jain
> On 28 Aug 2019, at 9:24 PM, David Sterba wrote: > > On Wed, Aug 28, 2019 at 04:01:04PM +0300, Nikolay Borisov wrote: >> >> >> On 28.08.19 г. 12:56 ч., Anand Jain wrote: >>> So when searching for BTRFS_DEV_ITEMS_OBJECTID it hits. Albeit it is >>> defined same as BTRFS_ROOT_TREE_OBJECTID. >>

[PATCH v2 1/2] btrfs-progs: add BTRFS_DEV_ITEMS_OBJECTID in comment in print-tree

2019-08-28 Thread Anand Jain
So when searching for BTRFS_DEV_ITEMS_OBJECTID, it hits, albeit it is defined same as BTRFS_ROOT_TREE_OBJECTID. Signed-off-by: Anand Jain --- v1->v2: Improve comment. print-tree.c | 5 + 1 file changed, 5 insertions(+) diff --git a/print-tree.c b/print-tree.c index b31e515f8989..b1c59d7765

Re: WARNING: CPU: 3 PID: 439 at fs/btrfs/ctree.h:1559 btrfs_update_device+0x1c5/0x1d0 [btrfs]

2019-08-28 Thread Qu Wenruo
On 2017/9/19 下午11:56, Rich Rauenzahn wrote: > I've filed a bug on this kernel trace -- I get 100's of these a day. > I'd like to make them go away If you want to solve the problem sooner, then mail list is faster than kernel bugzilla. For your case, it's just a warning for unaligned device

Re: [PATCH v2 1/2] btrfs-progs: add BTRFS_DEV_ITEMS_OBJECTID in comment in print-tree

2019-08-28 Thread Qu Wenruo
On 2019/8/28 下午10:06, Anand Jain wrote: > So when searching for BTRFS_DEV_ITEMS_OBJECTID, it hits, albeit it is > defined same as BTRFS_ROOT_TREE_OBJECTID. > > Signed-off-by: Anand Jain Reviewed-by: Qu Wenruo > --- > v1->v2: Improve comment. > > print-tree.c | 5 + > 1 file changed, 5

Re: No files in snapshot

2019-08-28 Thread Thomas Schneider
Hi, I was thinking of this, too. But it does not apply. root@ld5507:~# btrfs su list -to /var/lib ID  gen top level   path --  --- -   root@ld5507:~# btrfs su list -to /var ID  gen top level   path --  --- -   And there ar

[PATCH][v2] btrfs: rework wake_all_tickets

2019-08-28 Thread Josef Bacik
Now that we no longer partially fill tickets we need to rework wake_all_tickets to call btrfs_try_to_wakeup_tickets() in order to see if any subsequent tickets are able to be satisfied. If our tickets_id changes we know something happened and we can keep flushing. Also if we find a ticket that is

[PATCH][v2] btrfs: stop partially refilling tickets when releasing space

2019-08-28 Thread Josef Bacik
btrfs_space_info_add_old_bytes is used when adding the extra space from an existing reservation back into the space_info to be used by any waiting tickets. In order to keep us from overcommitting we check to make sure that we can still use this space for our reserve ticket, and if we cannot we'll

Re: [PATCH v2 1/2] btrfs-progs: add BTRFS_DEV_ITEMS_OBJECTID in comment in print-tree

2019-08-28 Thread David Sterba
On Wed, Aug 28, 2019 at 10:27:41PM +0800, Qu Wenruo wrote: > > > On 2019/8/28 下午10:06, Anand Jain wrote: > > So when searching for BTRFS_DEV_ITEMS_OBJECTID, it hits, albeit it is > > defined same as BTRFS_ROOT_TREE_OBJECTID. > > > > Signed-off-by: Anand Jain > > Reviewed-by: Qu Wenruo > > >

Re: [PATCH 0/9][v3] Rework reserve ticket handling

2019-08-28 Thread David Sterba
On Fri, Aug 23, 2019 at 02:55:33PM +0200, David Sterba wrote: > On Thu, Aug 22, 2019 at 03:10:53PM -0400, Josef Bacik wrote: > > This is the next round of my reserve ticket refinements. Most of the > > changes > > are just fixing issues brought up by review. The updated diffstat is as > > follo

Re: [PATCH 0/5][v2] Fix global reserve size and can overcommit

2019-08-28 Thread David Sterba
On Fri, Aug 23, 2019 at 03:17:26PM +0200, David Sterba wrote: > On Thu, Aug 22, 2019 at 03:18:59PM -0400, Josef Bacik wrote: > > This didn't series didn't change much, but I did move things around a > > little bit > > in previous series so these needed to be updated. > > > > fs/btrfs/block-rsv.c

Re: [PATCH v3 2/4] btrfs: create structure to encode checksum type and length

2019-08-28 Thread David Sterba
On Mon, Aug 26, 2019 at 01:48:32PM +0200, Johannes Thumshirn wrote: > Create a structure to encode the type and length for the known on-disk > checksums. > > This makes it easier to add new checksums later. > > Signed-off-by: Johannes Thumshirn > > --- > Changes to v2: > - Really remove initial

Re: [PATCH v3 2/4] btrfs: create structure to encode checksum type and length

2019-08-28 Thread David Sterba
On Wed, Aug 28, 2019 at 09:19:52PM +0200, David Sterba wrote: > On Mon, Aug 26, 2019 at 01:48:32PM +0200, Johannes Thumshirn wrote: > > Create a structure to encode the type and length for the known on-disk > > checksums. > > > > This makes it easier to add new checksums later. > > > > Signed-off

Spare Volume Features

2019-08-28 Thread Marc Oggier
Hi All, I am currently buidling a small data server for an experiment. I was wondering if the features of the spare volume introduced a couple of years ago (ttps://patchwork.kernel.org/patch/8687721/) would be release soon. I think this would be awesome to have a drive installed, that can be

Re: Spare Volume Features

2019-08-28 Thread Sean Greenslade
On August 28, 2019 5:51:02 PM PDT, Marc Oggier wrote: >Hi All, > >I am currently buidling a small data server for an experiment. > >I was wondering if the features of the spare volume introduced a couple > >of years ago (ttps://patchwork.kernel.org/patch/8687721/) would be >release soon. I think

[PATCH RFC v2.1] btrfs-progs: add readmirror property and ioctl to set get

2019-08-28 Thread Anand Jain
This patch adds readmirror property to be applied at the filesystem object. And uses ioctl BTRFS_IOC_GET_READMIRROR and BTRFS_IOC_SET_READMIRROR to get and set the property respectively. Signed-off-by: Anand Jain --- RFC v2->RFC v2.1: add dump-tree support, depends on the patch [PATCH] btr