]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Merge tag 'nfs-for-3.18-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 8 Oct 2014 16:49:23 +0000 (12:49 -0400)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 8 Oct 2014 16:49:23 +0000 (12:49 -0400)
Pull NFS client updates from Trond Myklebust:
 "Highlights include:

  Stable fixes:
   - fix an NFSv4.1 state renewal regression
   - fix open/lock state recovery error handling
   - fix lock recovery when CREATE_SESSION/SETCLIENTID_CONFIRM fails
   - fix statd when reconnection fails
   - don't wake tasks during connection abort
   - don't start reboot recovery if lease check fails
   - fix duplicate proc entries

  Features:
  - pNFS block driver fixes and clean ups from Christoph
  - More code cleanups from Anna
  - Improve mmap() writeback performance
  - Replace use of PF_TRANS with a more generic mechanism for avoiding
    deadlocks in nfs_release_page"

* tag 'nfs-for-3.18-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (66 commits)
  NFSv4.1: Fix an NFSv4.1 state renewal regression
  NFSv4: fix open/lock state recovery error handling
  NFSv4: Fix lock recovery when CREATE_SESSION/SETCLIENTID_CONFIRM fails
  NFS: Fabricate fscache server index key correctly
  SUNRPC: Add missing support for RPC_CLNT_CREATE_NO_RETRANS_TIMEOUT
  NFSv3: Fix missing includes of nfs3_fs.h
  NFS/SUNRPC: Remove other deadlock-avoidance mechanisms in nfs_release_page()
  NFS: avoid waiting at all in nfs_release_page when congested.
  NFS: avoid deadlocks with loop-back mounted NFS filesystems.
  MM: export page_wakeup functions
  SCHED: add some "wait..on_bit...timeout()" interfaces.
  NFS: don't use STABLE writes during writeback.
  NFSv4: use exponential retry on NFS4ERR_DELAY for async requests.
  rpc: Add -EPERM processing for xs_udp_send_request()
  rpc: return sent and err from xs_sendpages()
  lockd: Try to reconnect if statd has moved
  SUNRPC: Don't wake tasks during connection abort
  Fixing lease renewal
  nfs: fix duplicate proc entries
  pnfs/blocklayout: Fix a 64-bit division/remainder issue in bl_map_stripe
  ...

1  2 
include/linux/pagemap.h
mm/filemap.c

diff --combined include/linux/pagemap.h
index 5ba1813337df0d93a880eb13395ff826edf79520,2dca0cef350618d13346dfdaf4c551e5dab6b870..19191d39c4f3d80fdf287096315602046c7acd27
@@@ -96,7 -96,7 +96,7 @@@ static inline void mapping_set_gfp_mask
  }
  
  /*
 - * The page cache can done in larger chunks than
 + * The page cache can be done in larger chunks than
   * one page, because it allows for more efficient
   * throughput (it can then be mapped into user
   * space in smaller chunks for same flexibility).
@@@ -496,12 -496,14 +496,14 @@@ static inline int lock_page_or_retry(st
  }
  
  /*
-  * This is exported only for wait_on_page_locked/wait_on_page_writeback.
-  * Never use this directly!
+  * This is exported only for wait_on_page_locked/wait_on_page_writeback,
+  * and for filesystems which need to wait on PG_private.
   */
  extern void wait_on_page_bit(struct page *page, int bit_nr);
  
  extern int wait_on_page_bit_killable(struct page *page, int bit_nr);
+ extern int wait_on_page_bit_killable_timeout(struct page *page,
+                                            int bit_nr, unsigned long timeout);
  
  static inline int wait_on_page_locked_killable(struct page *page)
  {
        return 0;
  }
  
+ extern wait_queue_head_t *page_waitqueue(struct page *page);
+ static inline void wake_up_page(struct page *page, int bit)
+ {
+       __wake_up_bit(page_waitqueue(page), &page->flags, bit);
+ }
  /* 
   * Wait for a page to be unlocked.
   *
diff --combined mm/filemap.c
index 8554d20b3523eef2365a4d48185721be2960bcdf,b9b1413080be685df0428e30ea4195e416222164..0ab0a3ea5721a75b204bd34dc7c1bdeece07b04d
@@@ -670,17 -670,13 +670,13 @@@ EXPORT_SYMBOL(__page_cache_alloc)
   * at a cost of "thundering herd" phenomena during rare hash
   * collisions.
   */
static wait_queue_head_t *page_waitqueue(struct page *page)
+ wait_queue_head_t *page_waitqueue(struct page *page)
  {
        const struct zone *zone = page_zone(page);
  
        return &zone->wait_table[hash_ptr(page, zone->wait_table_bits)];
  }
- static inline void wake_up_page(struct page *page, int bit)
- {
-       __wake_up_bit(page_waitqueue(page), &page->flags, bit);
- }
+ EXPORT_SYMBOL(page_waitqueue);
  
  void wait_on_page_bit(struct page *page, int bit_nr)
  {
@@@ -703,6 -699,19 +699,19 @@@ int wait_on_page_bit_killable(struct pa
                             bit_wait_io, TASK_KILLABLE);
  }
  
+ int wait_on_page_bit_killable_timeout(struct page *page,
+                                      int bit_nr, unsigned long timeout)
+ {
+       DEFINE_WAIT_BIT(wait, &page->flags, bit_nr);
+       wait.key.timeout = jiffies + timeout;
+       if (!test_bit(bit_nr, &page->flags))
+               return 0;
+       return __wait_on_bit(page_waitqueue(page), &wait,
+                            bit_wait_io_timeout, TASK_KILLABLE);
+ }
+ EXPORT_SYMBOL_GPL(wait_on_page_bit_killable_timeout);
  /**
   * add_page_wait_queue - Add an arbitrary waiter to a page's wait queue
   * @page: Page defining the wait queue of interest
@@@ -727,7 -736,7 +736,7 @@@ EXPORT_SYMBOL_GPL(add_page_wait_queue)
   *
   * Unlocks the page and wakes up sleepers in ___wait_on_page_locked().
   * Also wakes sleepers in wait_on_page_writeback() because the wakeup
 - * mechananism between PageLocked pages and PageWriteback pages is shared.
 + * mechanism between PageLocked pages and PageWriteback pages is shared.
   * But that's OK - sleepers in wait_on_page_writeback() just go back to sleep.
   *
   * The mb is necessary to enforce ordering between the clear_bit and the read