pnfs: revoke device info on bulk layout recall
20.3. CB_LAYOUTRECALL "LAYOUTRECALL4_FSID and LAYOUTRECALL4_ALL specify that all the storage device ID to storage device address mappings in the affected file system(s) are also recalled." pnfs_file_layout_recall() now takes a nfs41_client instead of just the pnfs_file_layout_list, because both the layout list and device list are accessible from nfs41_client. for bulk recalls, calls new function pnfs_file_device_list_invalidate(). each device with layout_count=0 is removed and freed, and devices in use are flagged as REVOKED and freed when layout_count->0 layout_recall_return() now takes a pnfs_file_layout instead of pnfs_layout for access to pnfs_file_layout.device. pnfs_layout_io_start() and pnfs_layout_io_finish() do the same, because pnfs_layout_io_finish() calls layout_recall_return(). layout_recall_return() calls pnfs_file_device_put() to release its reference on the device Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
parent
e3119c281e
commit
9cd9744567
5 changed files with 86 additions and 40 deletions
|
|
@ -58,7 +58,7 @@ static enum pnfs_status pattern_init(
|
|||
enum pnfs_status status;
|
||||
|
||||
/* take a reference on the layout so we don't return it during io */
|
||||
status = pnfs_layout_io_start(&layout->layout);
|
||||
status = pnfs_layout_io_start(layout);
|
||||
if (status)
|
||||
goto out;
|
||||
|
||||
|
|
@ -70,7 +70,7 @@ static enum pnfs_status pattern_init(
|
|||
pattern->threads = calloc(pattern->count, sizeof(pnfs_io_thread));
|
||||
if (pattern->threads == NULL) {
|
||||
status = PNFSERR_RESOURCES;
|
||||
pnfs_layout_io_finished(&pattern->layout->layout);
|
||||
pnfs_layout_io_finished(pattern->layout);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
|
@ -115,7 +115,7 @@ static void pattern_free(
|
|||
IN pnfs_io_pattern *pattern)
|
||||
{
|
||||
/* inform the layout that our io is finished */
|
||||
pnfs_layout_io_finished(&pattern->layout->layout);
|
||||
pnfs_layout_io_finished(pattern->layout);
|
||||
free(pattern->threads);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue