diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-13 20:13:19 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-13 20:13:19 -0400 |
| commit | 06b8ab55289345ab191bf4bf0e4acc6d4bdf293d (patch) | |
| tree | 9af9215097e26c026f30a58c6ca3092ec15d1e1e | |
| parent | dc1cc85133120e49c223f36aa77d398b8abac727 (diff) | |
| parent | 71a6ec8ac587418ceb6b420def1ca44b334c1ff7 (diff) | |
Merge tag 'nfs-for-3.17-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Pull NFS client updates from Trond Myklebust:
"Highlights include:
- stable fix for a bug in nfs3_list_one_acl()
- speed up NFS path walks by supporting LOOKUP_RCU
- more read/write code cleanups
- pNFS fixes for layout return on close
- fixes for the RCU handling in the rpcsec_gss code
- more NFS/RDMA fixes"
* tag 'nfs-for-3.17-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (79 commits)
nfs: reject changes to resvport and sharecache during remount
NFS: Avoid infinite loop when RELEASE_LOCKOWNER getting expired error
SUNRPC: remove all refcounting of groupinfo from rpcauth_lookupcred
NFS: fix two problems in lookup_revalidate in RCU-walk
NFS: allow lockless access to access_cache
NFS: teach nfs_lookup_verify_inode to handle LOOKUP_RCU
NFS: teach nfs_neg_need_reval to understand LOOKUP_RCU
NFS: support RCU_WALK in nfs_permission()
sunrpc/auth: allow lockless (rcu) lookup of credential cache.
NFS: prepare for RCU-walk support but pushing tests later in code.
NFS: nfs4_lookup_revalidate: only evaluate parent if it will be used.
NFS: add checks for returned value of try_module_get()
nfs: clear_request_commit while holding i_lock
pnfs: add pnfs_put_lseg_async
pnfs: find swapped pages on pnfs commit lists too
nfs: fix comment and add warn_on for PG_INODE_REF
nfs: check wait_on_bit_lock err in page_group_lock
sunrpc: remove "ec" argument from encrypt_v2 operation
sunrpc: clean up sparse endianness warnings in gss_krb5_wrap.c
sunrpc: clean up sparse endianness warnings in gss_krb5_seal.c
...
54 files changed, 1967 insertions, 1288 deletions
diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c index 9b431f44fad9..cbb1797149d5 100644 --- a/fs/nfs/blocklayout/blocklayout.c +++ b/fs/nfs/blocklayout/blocklayout.c | |||
| @@ -210,8 +210,7 @@ static void bl_end_io_read(struct bio *bio, int err) | |||
| 210 | SetPageUptodate(bvec->bv_page); | 210 | SetPageUptodate(bvec->bv_page); |
| 211 | 211 | ||
| 212 | if (err) { | 212 | if (err) { |
| 213 | struct nfs_pgio_data *rdata = par->data; | 213 | struct nfs_pgio_header *header = par->data; |
| 214 | struct nfs_pgio_header *header = rdata->header; | ||
| 215 | 214 | ||
| 216 | if (!header->pnfs_error) | 215 | if (!header->pnfs_error) |
| 217 | header->pnfs_error = -EIO; | 216 | header->pnfs_error = -EIO; |
| @@ -224,43 +223,44 @@ static void bl_end_io_read(struct bio *bio, int err) | |||
| 224 | static void bl_read_cleanup(struct work_struct *work) | 223 | static void bl_read_cleanup(struct work_struct *work) |
| 225 | { | 224 | { |
| 226 | struct rpc_task *task; | 225 | struct rpc_task *task; |
| 227 | struct nfs_pgio_data *rdata; | 226 | struct nfs_pgio_header *hdr; |
| 228 | dprintk("%s enter\n", __func__); | 227 | dprintk("%s enter\n", __func__); |
| 229 | task = container_of(work, struct rpc_task, u.tk_work); | 228 | task = container_of(work, struct rpc_task, u.tk_work); |
| 230 | rdata = container_of(task, struct nfs_pgio_data, task); | 229 | hdr = container_of(task, struct nfs_pgio_header, task); |
| 231 | pnfs_ld_read_done(rdata); | 230 | pnfs_ld_read_done(hdr); |
| 232 | } | 231 | } |
| 233 | 232 | ||
| 234 | static void | 233 | static void |
| 235 | bl_end_par_io_read(void *data, int unused) | 234 | bl_end_par_io_read(void *data, int unused) |
| 236 | { | 235 | { |
| 237 | struct nfs_pgio_data *rdata = data; | 236 | struct nfs_pgio_header *hdr = data; |
| 238 | 237 | ||
| 239 | rdata->task.tk_status = rdata->header->pnfs_error; | 238 | hdr->task.tk_status = hdr->pnfs_error; |
| 240 | INIT_WORK(&rdata->task.u.tk_work, bl_read_cleanup); | 239 | INIT_WORK(&hdr->task.u.tk_work, bl_read_cleanup); |
| 241 | schedule_work(&rdata->task.u.tk_work); | 240 | schedule_work(&hdr->task.u.tk_work); |
| 242 | } | 241 | } |
| 243 | 242 | ||
| 244 | static enum pnfs_try_status | 243 | static enum pnfs_try_status |
| 245 | bl_read_pagelist(struct nfs_pgio_data *rdata) | 244 | bl_read_pagelist(struct nfs_pgio_header *hdr) |
| 246 | { | 245 | { |
| 247 | struct nfs_pgio_header *header = rdata->header; | 246 | struct nfs_pgio_header *header = hdr; |
| 248 | int i, hole; | 247 | int i, hole; |
| 249 | struct bio *bio = NULL; | 248 | struct bio *bio = NULL; |
| 250 | struct pnfs_block_extent *be = NULL, *cow_read = NULL; | 249 | struct pnfs_block_extent *be = NULL, *cow_read = NULL; |
| 251 | sector_t isect, extent_length = 0; | 250 | sector_t isect, extent_length = 0; |
| 252 | struct parallel_io *par; | 251 | struct parallel_io *par; |
| 253 | loff_t f_offset = rdata->args.offset; | 252 | loff_t f_offset = hdr->args.offset; |
| 254 | size_t bytes_left = rdata->args.count; | 253 | size_t bytes_left = hdr->args.count; |
| 255 | unsigned int pg_offset, pg_len; | 254 | unsigned int pg_offset, pg_len; |
| 256 | struct page **pages = rdata->args.pages; | 255 | struct page **pages = hdr->args.pages; |
| 257 | int pg_index = rdata->args.pgbase >> PAGE_CACHE_SHIFT; | 256 | int pg_index = hdr->args.pgbase >> PAGE_CACHE_SHIFT; |
| 258 | const bool is_dio = (header->dreq != NULL); | 257 | const bool is_dio = (header->dreq != NULL); |
| 259 | 258 | ||
| 260 | dprintk("%s enter nr_pages %u offset %lld count %u\n", __func__, | 259 | dprintk("%s enter nr_pages %u offset %lld count %u\n", __func__, |
| 261 | rdata->pages.npages, f_offset, (unsigned int)rdata->args.count); | 260 | hdr->page_array.npages, f_offset, |
| 261 | (unsigned int)hdr->args.count); | ||
| 262 | 262 | ||
| 263 | par = alloc_parallel(rdata); | 263 | par = alloc_parallel(hdr); |
| 264 | if (!par) | 264 | if (!par) |
| 265 | goto use_mds; | 265 | goto use_mds; |
| 266 | par->pnfs_callback = bl_end_par_io_read; | 266 | par->pnfs_callback = bl_end_par_io_read; |
| @@ -268,7 +268,7 @@ bl_read_pagelist(struct nfs_pgio_data *rdata) | |||
| 268 | 268 | ||
| 269 | isect = (sector_t) (f_offset >> SECTOR_SHIFT); | 269 | isect = (sector_t) (f_offset >> SECTOR_SHIFT); |
| 270 | /* Code assumes extents are page-aligned */ | 270 | /* Code assumes extents are page-aligned */ |
| 271 | for (i = pg_index; i < rdata->pages.npages; i++) { | 271 | for (i = pg_index; i < hdr->page_array.npages; i++) { |
| 272 | if (!extent_length) { | 272 | if (!extent_length) { |
| 273 | /* We've used up the previous extent */ | 273 | /* We've used up the previous extent */ |
| 274 | bl_put_extent(be); | 274 | bl_put_extent(be); |
| @@ -317,7 +317,8 @@ bl_read_pagelist(struct nfs_pgio_data *rdata) | |||
