diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-10-15 14:58:04 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-11-04 14:43:39 -0500 |
commit | bc5a89b337ee4b2fa6f577e7e1220d8c1ece71fc (patch) | |
tree | 6880127e805e1739dd00b2f8b5e65dbcff699567 /fs/nfs/nfs4filelayout.c | |
parent | eba24e1fe57df4e4cdee58af940f762eb336a113 (diff) |
NFSv4.1: Remove assertion BUG_ON()s from the files and generic layout code
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4filelayout.c')
-rw-r--r-- | fs/nfs/nfs4filelayout.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c index 2e45fd9c02a3..bfb28fa38e74 100644 --- a/fs/nfs/nfs4filelayout.c +++ b/fs/nfs/nfs4filelayout.c | |||
@@ -512,7 +512,6 @@ filelayout_read_pagelist(struct nfs_read_data *data) | |||
512 | loff_t offset = data->args.offset; | 512 | loff_t offset = data->args.offset; |
513 | u32 j, idx; | 513 | u32 j, idx; |
514 | struct nfs_fh *fh; | 514 | struct nfs_fh *fh; |
515 | int status; | ||
516 | 515 | ||
517 | dprintk("--> %s ino %lu pgbase %u req %Zu@%llu\n", | 516 | dprintk("--> %s ino %lu pgbase %u req %Zu@%llu\n", |
518 | __func__, hdr->inode->i_ino, | 517 | __func__, hdr->inode->i_ino, |
@@ -538,9 +537,8 @@ filelayout_read_pagelist(struct nfs_read_data *data) | |||
538 | data->mds_offset = offset; | 537 | data->mds_offset = offset; |
539 | 538 | ||
540 | /* Perform an asynchronous read to ds */ | 539 | /* Perform an asynchronous read to ds */ |
541 | status = nfs_initiate_read(ds->ds_clp->cl_rpcclient, data, | 540 | nfs_initiate_read(ds->ds_clp->cl_rpcclient, data, |
542 | &filelayout_read_call_ops, RPC_TASK_SOFTCONN); | 541 | &filelayout_read_call_ops, RPC_TASK_SOFTCONN); |
543 | BUG_ON(status != 0); | ||
544 | return PNFS_ATTEMPTED; | 542 | return PNFS_ATTEMPTED; |
545 | } | 543 | } |
546 | 544 | ||
@@ -554,7 +552,6 @@ filelayout_write_pagelist(struct nfs_write_data *data, int sync) | |||
554 | loff_t offset = data->args.offset; | 552 | loff_t offset = data->args.offset; |
555 | u32 j, idx; | 553 | u32 j, idx; |
556 | struct nfs_fh *fh; | 554 | struct nfs_fh *fh; |
557 | int status; | ||
558 | 555 | ||
559 | /* Retrieve the correct rpc_client for the byte range */ | 556 | /* Retrieve the correct rpc_client for the byte range */ |
560 | j = nfs4_fl_calc_j_index(lseg, offset); | 557 | j = nfs4_fl_calc_j_index(lseg, offset); |
@@ -579,10 +576,9 @@ filelayout_write_pagelist(struct nfs_write_data *data, int sync) | |||
579 | data->args.offset = filelayout_get_dserver_offset(lseg, offset); | 576 | data->args.offset = filelayout_get_dserver_offset(lseg, offset); |
580 | 577 | ||
581 | /* Perform an asynchronous write */ | 578 | /* Perform an asynchronous write */ |
582 | status = nfs_initiate_write(ds->ds_clp->cl_rpcclient, data, | 579 | nfs_initiate_write(ds->ds_clp->cl_rpcclient, data, |
583 | &filelayout_write_call_ops, sync, | 580 | &filelayout_write_call_ops, sync, |
584 | RPC_TASK_SOFTCONN); | 581 | RPC_TASK_SOFTCONN); |
585 | BUG_ON(status != 0); | ||
586 | return PNFS_ATTEMPTED; | 582 | return PNFS_ATTEMPTED; |
587 | } | 583 | } |
588 | 584 | ||
@@ -909,7 +905,7 @@ static void | |||
909 | filelayout_pg_init_read(struct nfs_pageio_descriptor *pgio, | 905 | filelayout_pg_init_read(struct nfs_pageio_descriptor *pgio, |
910 | struct nfs_page *req) | 906 | struct nfs_page *req) |
911 | { | 907 | { |
912 | BUG_ON(pgio->pg_lseg != NULL); | 908 | WARN_ON_ONCE(pgio->pg_lseg != NULL); |
913 | 909 | ||
914 | if (req->wb_offset != req->wb_pgbase) { | 910 | if (req->wb_offset != req->wb_pgbase) { |
915 | /* | 911 | /* |
@@ -939,7 +935,7 @@ filelayout_pg_init_write(struct nfs_pageio_descriptor *pgio, | |||
939 | struct nfs_commit_info cinfo; | 935 | struct nfs_commit_info cinfo; |
940 | int status; | 936 | int status; |
941 | 937 | ||
942 | BUG_ON(pgio->pg_lseg != NULL); | 938 | WARN_ON_ONCE(pgio->pg_lseg != NULL); |
943 | 939 | ||
944 | if (req->wb_offset != req->wb_pgbase) | 940 | if (req->wb_offset != req->wb_pgbase) |
945 | goto out_mds; | 941 | goto out_mds; |
@@ -1187,7 +1183,6 @@ static void filelayout_recover_commit_reqs(struct list_head *dst, | |||
1187 | */ | 1183 | */ |
1188 | for (i = 0, b = cinfo->ds->buckets; i < cinfo->ds->nbuckets; i++, b++) { | 1184 | for (i = 0, b = cinfo->ds->buckets; i < cinfo->ds->nbuckets; i++, b++) { |
1189 | if (transfer_commit_list(&b->written, dst, cinfo, 0)) { | 1185 | if (transfer_commit_list(&b->written, dst, cinfo, 0)) { |
1190 | BUG_ON(!list_empty(&b->written)); | ||
1191 | pnfs_put_lseg(b->wlseg); | 1186 | pnfs_put_lseg(b->wlseg); |
1192 | b->wlseg = NULL; | 1187 | b->wlseg = NULL; |
1193 | } | 1188 | } |