diff options
Diffstat (limited to 'fs/nfs/flexfilelayout/flexfilelayout.c')
-rw-r--r-- | fs/nfs/flexfilelayout/flexfilelayout.c | 43 |
1 files changed, 1 insertions, 42 deletions
diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c index c22ecaa86c1c..315cc68945b9 100644 --- a/fs/nfs/flexfilelayout/flexfilelayout.c +++ b/fs/nfs/flexfilelayout/flexfilelayout.c | |||
@@ -1332,47 +1332,6 @@ ff_layout_write_pagelist(struct nfs_pgio_header *hdr, int sync) | |||
1332 | return PNFS_ATTEMPTED; | 1332 | return PNFS_ATTEMPTED; |
1333 | } | 1333 | } |
1334 | 1334 | ||
1335 | static void | ||
1336 | ff_layout_mark_request_commit(struct nfs_page *req, | ||
1337 | struct pnfs_layout_segment *lseg, | ||
1338 | struct nfs_commit_info *cinfo, | ||
1339 | u32 ds_commit_idx) | ||
1340 | { | ||
1341 | struct list_head *list; | ||
1342 | struct pnfs_commit_bucket *buckets; | ||
1343 | |||
1344 | spin_lock(cinfo->lock); | ||
1345 | buckets = cinfo->ds->buckets; | ||
1346 | list = &buckets[ds_commit_idx].written; | ||
1347 | if (list_empty(list)) { | ||
1348 | /* Non-empty buckets hold a reference on the lseg. That ref | ||
1349 | * is normally transferred to the COMMIT call and released | ||
1350 | * there. It could also be released if the last req is pulled | ||
1351 | * off due to a rewrite, in which case it will be done in | ||
1352 | * pnfs_common_clear_request_commit | ||
1353 | */ | ||
1354 | WARN_ON_ONCE(buckets[ds_commit_idx].wlseg != NULL); | ||
1355 | buckets[ds_commit_idx].wlseg = pnfs_get_lseg(lseg); | ||
1356 | } | ||
1357 | set_bit(PG_COMMIT_TO_DS, &req->wb_flags); | ||
1358 | cinfo->ds->nwritten++; | ||
1359 | |||
1360 | /* nfs_request_add_commit_list(). We need to add req to list without | ||
1361 | * dropping cinfo lock. | ||
1362 | */ | ||
1363 | set_bit(PG_CLEAN, &(req)->wb_flags); | ||
1364 | nfs_list_add_request(req, list); | ||
1365 | cinfo->mds->ncommit++; | ||
1366 | spin_unlock(cinfo->lock); | ||
1367 | if (!cinfo->dreq) { | ||
1368 | inc_zone_page_state(req->wb_page, NR_UNSTABLE_NFS); | ||
1369 | inc_bdi_stat(inode_to_bdi(page_file_mapping(req->wb_page)->host), | ||
1370 | BDI_RECLAIMABLE); | ||
1371 | __mark_inode_dirty(req->wb_context->dentry->d_inode, | ||
1372 | I_DIRTY_DATASYNC); | ||
1373 | } | ||
1374 | } | ||
1375 | |||
1376 | static u32 calc_ds_index_from_commit(struct pnfs_layout_segment *lseg, u32 i) | 1335 | static u32 calc_ds_index_from_commit(struct pnfs_layout_segment *lseg, u32 i) |
1377 | { | 1336 | { |
1378 | return i; | 1337 | return i; |
@@ -1540,7 +1499,7 @@ static struct pnfs_layoutdriver_type flexfilelayout_type = { | |||
1540 | .pg_write_ops = &ff_layout_pg_write_ops, | 1499 | .pg_write_ops = &ff_layout_pg_write_ops, |
1541 | .get_ds_info = ff_layout_get_ds_info, | 1500 | .get_ds_info = ff_layout_get_ds_info, |
1542 | .free_deviceid_node = ff_layout_free_deveiceid_node, | 1501 | .free_deviceid_node = ff_layout_free_deveiceid_node, |
1543 | .mark_request_commit = ff_layout_mark_request_commit, | 1502 | .mark_request_commit = pnfs_layout_mark_request_commit, |
1544 | .clear_request_commit = pnfs_generic_clear_request_commit, | 1503 | .clear_request_commit = pnfs_generic_clear_request_commit, |
1545 | .scan_commit_lists = pnfs_generic_scan_commit_lists, | 1504 | .scan_commit_lists = pnfs_generic_scan_commit_lists, |
1546 | .recover_commit_reqs = pnfs_generic_recover_commit_reqs, | 1505 | .recover_commit_reqs = pnfs_generic_recover_commit_reqs, |