]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sparc64: VDS should try indefinitely to allocate IO pages
authorBijan Mottahedeh <bijan.mottahedeh@oracle.com>
Fri, 21 Oct 2016 08:10:55 +0000 (04:10 -0400)
committerAllen Pais <allen.pais@oracle.com>
Tue, 8 Nov 2016 10:07:53 +0000 (15:37 +0530)
Orabug: 24924152

Signed-off-by: Bijan Mottahedeh <bijan.mottahedeh@oracle.com>
Reviewd-by: Alexandre Chartre <alexandre.chartre@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
drivers/block/vds/vds_io.c

index 13d7301fbf2ab5a911a66ccaae9e4ba6fe99b374..f8473ad0d797da0f0d993ac1f6ab2a038451a839 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * vds_io.c: LDOM Virtual Disk Server.
  *
- * Copyright (C) 2014, 2015 Oracle. All rights reserved.
+ * Copyright (C) 2014, 2016 Oracle. All rights reserved.
  */
 
 #include "vds.h"
@@ -141,9 +141,12 @@ static int vds_io_alloc_pages(struct vds_io *io, unsigned long len)
 
        BUG_ON(len % PAGE_SIZE != 0);
        io->ord = get_order(len);
-       io->pages = alloc_pages(GFP_KERNEL | __GFP_COMP, io->ord);
-       if (!io->pages)
-               return -ENOMEM;
+       do {
+               io->pages = alloc_pages(GFP_KERNEL | __GFP_COMP | __GFP_NOWARN,
+                                       io->ord);
+               if (!io->pages)
+                       msleep(10);
+       } while (!io->pages);
        io->npages = len >> PAGE_SHIFT;
 
        vdsdbg(MEM, "ord=%d pages=%p npages=%d\n", io->ord, io->pages,