diff --git a/drbd.changes b/drbd.changes index a672a3c..be9450a 100644 --- a/drbd.changes +++ b/drbd.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Nov 20 06:50:29 UTC 2015 - nwang@suse.com + +- BSC#955968, support GFP_RECLAIM in kernel4.4 +- Add rename-GFP_WAIT-to-GFP_RECLAIM.patch + ------------------------------------------------------------------- Thu Oct 22 05:35:03 UTC 2015 - nwang@suse.com diff --git a/drbd.spec b/drbd.spec index ca8740e..8133fdd 100644 --- a/drbd.spec +++ b/drbd.spec @@ -40,6 +40,7 @@ Patch2: new-bio-struct.patch #Patch for fate: https://fate.suse.com/317940 #Whether can merge into linbit is under discussion Patch3: 0001-Support-zeroout-device-in-initial-sync.patch +Patch4: rename-GFP_WAIT-to-GFP_RECLAIM.patch BuildRequires: kernel-source BuildRequires: kernel-syms @@ -76,6 +77,7 @@ installed kernel. %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 %build rm -rf obj diff --git a/rename-GFP_WAIT-to-GFP_RECLAIM.patch b/rename-GFP_WAIT-to-GFP_RECLAIM.patch new file mode 100644 index 0000000..a13eb38 --- /dev/null +++ b/rename-GFP_WAIT-to-GFP_RECLAIM.patch @@ -0,0 +1,32 @@ +Index: drbd-8.4.6/drbd/drbd_bitmap.c +=================================================================== +--- drbd-8.4.6.orig/drbd/drbd_bitmap.c ++++ drbd-8.4.6/drbd/drbd_bitmap.c +@@ -1084,7 +1084,11 @@ static void bm_page_io_async(struct drbd + bm_set_page_unchanged(b->bm_pages[page_nr]); + + if (ctx->flags & BM_AIO_COPY_PAGES) { ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0) ++ page = mempool_alloc(drbd_md_io_page_pool, __GFP_HIGHMEM|__GFP_RECLAIM); ++#else + page = mempool_alloc(drbd_md_io_page_pool, __GFP_HIGHMEM|__GFP_WAIT); ++#endif + copy_highpage(page, b->bm_pages[page_nr]); + bm_store_page_idx(page, page_nr); + } else +Index: drbd-8.4.6/drbd/drbd_receiver.c +=================================================================== +--- drbd-8.4.6.orig/drbd/drbd_receiver.c ++++ drbd-8.4.6/drbd/drbd_receiver.c +@@ -421,7 +421,11 @@ drbd_alloc_peer_req(struct drbd_peer_dev + } + + if (has_payload && data_size) { ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0) ++ page = drbd_alloc_pages(peer_device, nr_pages, (gfp_mask & __GFP_RECLAIM)); ++#else + page = drbd_alloc_pages(peer_device, nr_pages, (gfp_mask & __GFP_WAIT)); ++#endif + if (!page) + goto fail; + }