Re: [dm-devel] [PATCH 5/6] libmultipath: simplify failed wwid code

2020-05-15 Thread Martin Wilck
On Thu, 2020-05-14 at 20:59 -0500, Benjamin Marzinski wrote: > The (is|mark|unmark)_failed_wwid code is needlessly complicated. > Locking a file is necssary if multiple processes could otherwise be > writing to it at the same time. That is not the case with the > failed_wwids files. They can simply

Re: [dm-devel] [PATCH 4/6] Unit tests for is_path_valid()

2020-05-15 Thread Martin Wilck
On Thu, 2020-05-14 at 20:59 -0500, Benjamin Marzinski wrote: > Signed-off-by: Benjamin Marzinski Two minor nits below, otherwise ack. > --- > tests/Makefile | 4 +- > tests/valid.c | 424 > + > 2 files changed, 427 insertions(+), 1 deletion(-)

Re: [dm-devel] [PATCH 3/6] multipath: centralize validation code

2020-05-15 Thread Martin Wilck
On Thu, 2020-05-14 at 20:59 -0500, Benjamin Marzinski wrote: > This code pulls the multipath path validation code out of > configure(), > and puts it into its own function, check_path_valid(). This function > calls a new libmultipath function, is_path_valid() to check just path > requested. This se

Re: [dm-devel] [PATCH 2/6] libmultipath: make sysfs_is_multipathed able to return wwid

2020-05-15 Thread Martin Wilck
On Thu, 2020-05-14 at 20:59 -0500, Benjamin Marzinski wrote: > sysfs_is_multipathed reads the wwid of the dm device holding a path > to > check if its a multipath device. Add code to optinally set pp->wwid > to > that wwid. This will be used by a future patch. > > Signed-off-by: Benjamin Marzins

Re: [dm-devel] [PATCH 0/6] multipath: path validation library prep work

2020-05-15 Thread Benjamin Marzinski
On Thu, May 14, 2020 at 08:59:16PM -0500, Benjamin Marzinski wrote: > I've been playing around with the SID code more and I've decided to hold > off on submitting the library until I have it working with the SID > multipath module better. Instead, I've pulled out the common code that > multipath -u

Re: [dm-devel] [dm:for-next 53/58] drivers/md/dm-zoned-metadata.c:779:3: error: implicit declaration of function 'export_uuid'

2020-05-15 Thread Mike Snitzer
On Fri, May 15 2020 at 3:25am -0400, Hannes Reinecke wrote: > Hi Mike, > > This is cause by missing commit d01cd62400b3 ("uuid: Add inline > helpers to import / export UUIDs"), which went into 5.7. > Mind to update your tree? Rebased on v5.7-rc5, thanks -- dm-devel mailing list dm-devel@redha

Re: [dm-devel] [dm:for-next 53/58] drivers/md/dm-zoned-metadata.c:779:3: error: implicit declaration of function 'export_uuid'

2020-05-15 Thread Hannes Reinecke
Hi Mike, On 5/15/20 8:32 AM, kbuild test robot wrote: tree: https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git for-next head: 6c871f63986b34c7768080259ddf5991c55ee385 commit: 70978208ec91d798066f4c291bc98ff914bea222 [53/58] dm zoned: metadata version 2 config: nios

Re: [dm-devel] [PATCH v2 07/10] block: use sectors_to_npage() and PAGE_SECTORS to clean up code

2020-05-15 Thread Leizhen (ThunderTown)
On 2020/5/15 12:19, Matthew Wilcox wrote: > On Thu, May 07, 2020 at 03:50:57PM +0800, Zhen Lei wrote: >> +++ b/block/blk-settings.c >> @@ -150,7 +150,7 @@ void blk_queue_max_hw_sectors(struct request_queue *q, >> unsigned int max_hw_secto >> unsigned int max_sectors; >> >> if ((max_

Re: [dm-devel] [RFC PATCH v3 00/12] Integrity Policy Enforcement LSM (IPE)

2020-05-15 Thread Mickaël Salaün
On 12/05/2020 22:46, Deven Bowers wrote: > > > On 5/11/2020 11:03 AM, Deven Bowers wrote: >> >> >> On 5/10/2020 2:28 AM, Mickaël Salaün wrote: >> >> [...snip] >> Additionally, rules are evaluated top-to-bottom. As a result, any revocation rules, or denies should be placed early i

Re: [dm-devel] [PATCH v2 06/10] mm/swap: use npage_to_sectors() and PAGE_SECTORS to clean up code

2020-05-15 Thread Leizhen (ThunderTown)
On 2020/5/15 12:06, Matthew Wilcox wrote: > On Thu, May 07, 2020 at 03:50:56PM +0800, Zhen Lei wrote: >> @@ -266,7 +266,7 @@ int swap_writepage(struct page *page, struct >> writeback_control *wbc) >> >> static sector_t swap_page_sector(struct page *page) >> { >> -return (sector_t)__page

Re: [dm-devel] [PATCH v2 06/10] mm/swap: use npage_to_sectors() and PAGE_SECTORS to clean up code

2020-05-15 Thread Matthew Wilcox
On Thu, May 07, 2020 at 03:50:56PM +0800, Zhen Lei wrote: > @@ -266,7 +266,7 @@ int swap_writepage(struct page *page, struct > writeback_control *wbc) > > static sector_t swap_page_sector(struct page *page) > { > - return (sector_t)__page_file_index(page) << (PAGE_SHIFT - 9); > + retur

Re: [dm-devel] [PATCH v2 07/10] block: use sectors_to_npage() and PAGE_SECTORS to clean up code

2020-05-15 Thread Matthew Wilcox
On Thu, May 07, 2020 at 03:50:57PM +0800, Zhen Lei wrote: > +++ b/block/blk-settings.c > @@ -150,7 +150,7 @@ void blk_queue_max_hw_sectors(struct request_queue *q, > unsigned int max_hw_secto > unsigned int max_sectors; > > if ((max_hw_sectors << 9) < PAGE_SIZE) { > - max

Re: [dm-devel] [PATCH v2 00/10] clean up SECTOR related macros and sectors/pages conversions

2020-05-15 Thread Leizhen (ThunderTown)
Hi, all: It seems no one take care about these patches. But I think patch 1 is need. And the main discussion points of others is whether we should add sectors_to_npage()/npage_to_sectors() or keep PAGE_SECTORS_SHIFT. And which marco name do we prefer: PAGE_SECTORS vs SECTORS_PER_PAGE, PAGE_SEC

Re: [dm-devel] [PATCH v2 06/10] mm/swap: use npage_to_sectors() and PAGE_SECTORS to clean up code

2020-05-15 Thread Matthew Wilcox
On Thu, May 07, 2020 at 03:50:56PM +0800, Zhen Lei wrote: > +++ b/mm/page_io.c > @@ -38,7 +38,7 @@ static struct bio *get_swap_bio(gfp_t gfp_flags, > > bio->bi_iter.bi_sector = map_swap_page(page, &bdev); > bio_set_dev(bio, bdev); > - bio->bi_iter.bi_sector

Re: [dm-devel] [PATCH v2 06/10] mm/swap: use npage_to_sectors() and PAGE_SECTORS to clean up code

2020-05-15 Thread Leizhen (ThunderTown)
On 2020/5/15 12:14, Matthew Wilcox wrote: > On Thu, May 07, 2020 at 03:50:56PM +0800, Zhen Lei wrote: >> +++ b/mm/page_io.c >> @@ -38,7 +38,7 @@ static struct bio *get_swap_bio(gfp_t gfp_flags, >> >> bio->bi_iter.bi_sector = map_swap_page(page, &bdev); >> bio_set_dev(