lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20170410120346.12076998@canb.auug.org.au>
Date:   Mon, 10 Apr 2017 12:03:46 +1000
From:   Stephen Rothwell <sfr@...b.auug.org.au>
To:     Shaohua Li <shli@...nel.org>, Jens Axboe <axboe@...nel.dk>
Cc:     Linux-Next Mailing List <linux-next@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Christoph Hellwig <hch@....de>,
        Ming Lei <tom.leiming@...il.com>
Subject: linux-next: manual merge of the md tree with the block tree

Hi Shaohua,

Today's linux-next merge of the md tree got a conflict in:

  drivers/md/md.h

between commit:

  3deff1a70d59 ("md: support REQ_OP_WRITE_ZEROES")

from the block tree and commits:

  d8e29fbc3bed ("md: move two macros into md.h")
  513e2faa0138 ("md: prepare for managing resync I/O pages in clean way")

from the md tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/md/md.h
index 1e76d64ce180,0418b29945e7..000000000000
--- a/drivers/md/md.h
+++ b/drivers/md/md.h
@@@ -710,10 -719,58 +719,65 @@@ static inline void mddev_check_writesam
  		mddev->queue->limits.max_write_same_sectors = 0;
  }
  
 +static inline void mddev_check_write_zeroes(struct mddev *mddev, struct bio *bio)
 +{
 +	if (bio_op(bio) == REQ_OP_WRITE_ZEROES &&
 +	    !bdev_get_queue(bio->bi_bdev)->limits.max_write_zeroes_sectors)
 +		mddev->queue->limits.max_write_zeroes_sectors = 0;
 +}
++
+ /* Maximum size of each resync request */
+ #define RESYNC_BLOCK_SIZE (64*1024)
+ #define RESYNC_PAGES ((RESYNC_BLOCK_SIZE + PAGE_SIZE-1) / PAGE_SIZE)
+ 
+ /* for managing resync I/O pages */
+ struct resync_pages {
+ 	unsigned	idx;	/* for get/put page from the pool */
+ 	void		*raid_bio;
+ 	struct page	*pages[RESYNC_PAGES];
+ };
+ 
+ static inline int resync_alloc_pages(struct resync_pages *rp,
+ 				     gfp_t gfp_flags)
+ {
+ 	int i;
+ 
+ 	for (i = 0; i < RESYNC_PAGES; i++) {
+ 		rp->pages[i] = alloc_page(gfp_flags);
+ 		if (!rp->pages[i])
+ 			goto out_free;
+ 	}
+ 
+ 	return 0;
+ 
+ out_free:
+ 	while (--i >= 0)
+ 		put_page(rp->pages[i]);
+ 	return -ENOMEM;
+ }
+ 
+ static inline void resync_free_pages(struct resync_pages *rp)
+ {
+ 	int i;
+ 
+ 	for (i = 0; i < RESYNC_PAGES; i++)
+ 		put_page(rp->pages[i]);
+ }
+ 
+ static inline void resync_get_all_pages(struct resync_pages *rp)
+ {
+ 	int i;
+ 
+ 	for (i = 0; i < RESYNC_PAGES; i++)
+ 		get_page(rp->pages[i]);
+ }
+ 
+ static inline struct page *resync_fetch_page(struct resync_pages *rp,
+ 					     unsigned idx)
+ {
+ 	if (WARN_ON_ONCE(idx >= RESYNC_PAGES))
+ 		return NULL;
+ 	return rp->pages[idx];
+ }
+ 
  #endif /* _MD_MD_H */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ