[dm-devel] [PATCH 06/14] block: lift setting the readahead size into the block layer

2020-07-22 Thread Christoph Hellwig
Drivers shouldn't really mess with the readahead size, as that is a VM concept. Instead set it based on the optimal I/O size by lifting the algorithm from the md driver when registering the disk. Also set bdi->io_pages there as well by applying the same scheme based on max_sectors. Signed-off-by

[dm-devel] [PATCH 14/14] bdi: replace BDI_CAP_NO_{WRITEBACK, ACCT_DIRTY} with a single flag

2020-07-22 Thread Christoph Hellwig
Replace the two negative flags that are always used together with a single positive flag that indicates the writeback capability instead of two related non-capabilities. Also remove the pointless wrappers to just check the flag. Signed-off-by: Christoph Hellwig --- fs/9p/vfs_file.c|

[dm-devel] [PATCH 03/14] drbd: remove RB_CONGESTED_REMOTE

2020-07-22 Thread Christoph Hellwig
This case isn't ever used. Signed-off-by: Christoph Hellwig --- drivers/block/drbd/drbd_req.c | 4 include/linux/drbd.h | 1 - 2 files changed, 5 deletions(-) diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c index 674be09b2da94a..4d944f2eb56efa 100644 ---

Re: [dm-devel] [PATCH 02/14] drbd: remove dead code in device_to_statistics

2020-07-22 Thread Christoph Hellwig
On Wed, Jul 22, 2020 at 07:03:21AM +, Johannes Thumshirn wrote: > On 22/07/2020 08:28, Christoph Hellwig wrote: > > Ever since the switch to blk-mq, a lower device not use by VM >in-use/used? ~^ Yeah, this should be used. > Also this looks like the

Re: [dm-devel] [PATCH 06/14] block: lift setting the readahead size into the block layer

2020-07-22 Thread Christoph Hellwig
On Wed, Jul 22, 2020 at 07:13:54AM +, Johannes Thumshirn wrote: > On 22/07/2020 08:27, Christoph Hellwig wrote: > > + q->backing_dev_info->ra_pages = > > + max(queue_io_opt(q) * 2 / PAGE_SIZE, VM_READAHEAD_PAGES); > > Dumb question, wouldn't a '>> PAGE_SHIFT' be better instead of a

Re: [dm-devel] [PATCH 08/14] block: add helper macros for queue sysfs entries

2020-07-22 Thread Johannes Thumshirn
Looks good, Reviewed-by: Johannes Thumshirn -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH v2 0/7] crypto: add CRYPTO_ALG_ALLOCATES_MEMORY

2020-07-22 Thread Herbert Xu
On Fri, Jul 17, 2020 at 05:42:43PM +0300, Horia Geantă wrote: > > Looks like there's no mention of a limit on src, dst scatterlists size > that crypto implementations could use when pre-allocating memory > and crypto users needing CRYPTO_ALG_ALLOCATES_MEMORY should be aware of > (for the contract t

Re: [dm-devel] [PATCH 02/14] drbd: remove dead code in device_to_statistics

2020-07-22 Thread Johannes Thumshirn
On 22/07/2020 09:07, Christoph Hellwig wrote: > As far as I can tell this is a netlink user ABI. > I guess it has to stay then -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH 02/14] drbd: remove dead code in device_to_statistics

2020-07-22 Thread Johannes Thumshirn
On 22/07/2020 08:28, Christoph Hellwig wrote: > Ever since the switch to blk-mq, a lower device not use by VM in-use/used? ~^ Also this looks like the last user of 'dev_lower_blocked' so it could be removed from device_statistics if it's not an ABI (not s

Re: [dm-devel] [PATCH 01/14] fs: remove the unused SB_I_MULTIROOT flag

2020-07-22 Thread Johannes Thumshirn
A little bit of git archeology shows the last user of SB_I_MULTIROOT is gone with f2aedb713c28 ("NFS: Add fs_context support.") Reviewed-by: Johannes Thumshirn -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH 06/14] block: lift setting the readahead size into the block layer

2020-07-22 Thread Johannes Thumshirn
On 22/07/2020 08:27, Christoph Hellwig wrote: > + q->backing_dev_info->ra_pages = > + max(queue_io_opt(q) * 2 / PAGE_SIZE, VM_READAHEAD_PAGES); Dumb question, wouldn't a '>> PAGE_SHIFT' be better instead of a potentially costly division? Or aren't we caring at all as it's a) not

Re: [dm-devel] [PATCH 03/14] drbd: remove RB_CONGESTED_REMOTE

2020-07-22 Thread Johannes Thumshirn
Looks good, Reviewed-by: Johannes Thumshirn -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel

[dm-devel] [PATCH] libmultipath: free pgp if add_pathgroup fails in disassemble_map func

2020-07-22 Thread Zhiqiang Liu
In disassemble_map func, pgp will be added to mpp->pg by calling add_pathgroup after allocing a pathgroup (pgp) successfully. However, if add_pathgroup fails, the pgp is actually not inserted into mpp->pg. So, calling free_pgvec(mpp->pg) cannot free the pgp, then memory leak problem occurs. disass

[dm-devel] [PATCH] libmultipath: free pp if store_path fails in disassemble_map

2020-07-22 Thread Zhiqiang Liu
In disassemble_map func, one pp will be allocated and stored in pathvec (only in client mode) and pgp->paths. However, if store_path fails, pp will not be freed, then memory leak problem occurs. Here, we will call free_path to free pp when store_path fails. Signed-off-by: Zhiqiang Liu Signed-off

[dm-devel] [PATCH] dm-integrity: revert adc0daad366b to fix recalculation

2020-07-22 Thread Mikulas Patocka
Hi Mike Please submit this to Linus and to RHEL-8. Mikulas From: Mikulas Patocka The patch adc0daad366b62ca1bce3e2958a40b0b71a8b8b3 broke recalculation on dm-integrity. The patch replaces a private variable "suspending" with a call to "dm_suspended". The problem is that dm_suspended returns

Re: [dm-devel] dm-integrity: revert adc0daad366b to fix recalculation

2020-07-22 Thread Mike Snitzer
On Wed, Jul 22 2020 at 2:46pm -0400, Mikulas Patocka wrote: > Hi Mike > > Please submit this to Linus and to RHEL-8. > > Mikulas > > > > From: Mikulas Patocka > > The patch adc0daad366b62ca1bce3e2958a40b0b71a8b8b3 broke recalculation on > dm-integrity. The patch replaces a private variabl

Re: [dm-devel] dm-integrity: revert adc0daad366b to fix recalculation

2020-07-22 Thread Mikulas Patocka
On Wed, 22 Jul 2020, Mike Snitzer wrote: > On Wed, Jul 22 2020 at 2:46pm -0400, > Mikulas Patocka wrote: > > > Hi Mike > > > > Please submit this to Linus and to RHEL-8. > > > > Mikulas > > > > > > > > From: Mikulas Patocka > > > > The patch adc0daad366b62ca1bce3e2958a40b0b71a8b8b3 br

Re: [dm-devel] [PATCH] libmultipath: free pgp if add_pathgroup fails in disassemble_map func

2020-07-22 Thread Benjamin Marzinski
On Wed, Jul 22, 2020 at 04:36:04PM +0800, Zhiqiang Liu wrote: > In disassemble_map func, pgp will be added to mpp->pg by calling > add_pathgroup after allocing a pathgroup (pgp) successfully. However, > if add_pathgroup fails, the pgp is actually not inserted into mpp->pg. > So, calling free_pgvec(

Re: [dm-devel] [PATCH] libmultipath: free pp if store_path fails in disassemble_map

2020-07-22 Thread Benjamin Marzinski
On Wed, Jul 22, 2020 at 04:41:28PM +0800, Zhiqiang Liu wrote: > In disassemble_map func, one pp will be allocated and stored in pathvec > (only in client mode) and pgp->paths. However, if store_path fails, pp > will not be freed, then memory leak problem occurs. > > Here, we will call free_path to

Re: [dm-devel] [PATCH] libmultipath: free pp if store_path fails in disassemble_map

2020-07-22 Thread Zhiqiang Liu
On 2020/7/23 4:53, Benjamin Marzinski wrote: > On Wed, Jul 22, 2020 at 04:41:28PM +0800, Zhiqiang Liu wrote: >> In disassemble_map func, one pp will be allocated and stored in pathvec >> (only in client mode) and pgp->paths. However, if store_path fails, pp >> will not be freed, then memory leak

Re: [dm-devel] [PATCH] libmultipath: free pgp if add_pathgroup fails in disassemble_map func

2020-07-22 Thread Zhiqiang Liu
Thanks for your review. On 2020/7/23 4:48, Benjamin Marzinski wrote: > On Wed, Jul 22, 2020 at 04:36:04PM +0800, Zhiqiang Liu wrote: >> In disassemble_map func, pgp will be added to mpp->pg by calling >> add_pathgroup after allocing a pathgroup (pgp) successfully. However, >> if add_pathgroup fail