pnfs: only return-on-close for last close
added pnfs_layout.open_count to count open references, and only return the layout when pnfs_open_state_close() takes the open_count to 0 use InterlockedIncrement/Decrement to avoid an exclusive lock on the layout Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
parent
83ab0b3f86
commit
d7e438be5e
2 changed files with 10 additions and 6 deletions
|
|
@ -163,6 +163,7 @@ typedef struct __pnfs_layout {
|
|||
enum pnfs_iomode iomode;
|
||||
enum pnfs_layout_status status;
|
||||
bool_t return_on_close;
|
||||
LONG open_count; /* for return on last close */
|
||||
uint32_t io_count; /* number of pending io operations */
|
||||
SRWLOCK lock;
|
||||
} pnfs_layout;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue