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:
Casey Bodley 2010-12-02 10:32:15 -05:00
parent e3119c281e
commit 9cd9744567
5 changed files with 86 additions and 40 deletions

View file

@ -258,14 +258,14 @@ void pnfs_open_state_close(
IN bool_t remove);
enum pnfs_status pnfs_file_layout_recall(
IN struct pnfs_file_layout_list *layouts,
IN struct __nfs41_client *client,
IN const struct cb_layoutrecall_args *recall);
enum pnfs_status pnfs_layout_io_start(
IN pnfs_layout *layout);
IN pnfs_file_layout *layout);
void pnfs_layout_io_finished(
IN pnfs_layout *layout);
IN pnfs_file_layout *layout);
__inline int is_dense(
@ -294,6 +294,9 @@ enum pnfs_status pnfs_file_device_list_create(
void pnfs_file_device_list_free(
IN struct pnfs_file_device_list *devices);
void pnfs_file_device_list_invalidate(
IN struct pnfs_file_device_list *devices);
enum pnfs_status pnfs_file_device_get(
IN struct __nfs41_session *session,
IN struct pnfs_file_device_list *devices,