[pnfs] [PATCH] pnfs: sync layout get/return

Trond Myklebust trond.myklebust at fys.uio.no
Thu Sep 20 17:53:07 EDT 2007


On Thu, 2007-09-20 at 23:20 +0200, Benny Halevy wrote:
> synchronize between layout get and return operations on
> the pnfs client.
> 
> Use per-server read/write semaphore to synchronize
> between per-file layout gets and returns vs. recall_{fsid,all}.
> recall_{fsid,all} loop takes an exclusive (down_write) lock
> and per-file layout_{get,return} take a shared (down_read) lock.
> This allows only one recall_{fsid,all} processing at a time per server.

Please look for other ways to do this sort of thing. I'm trying to get
rid of most of the existing r/w semaphores and mutexes since they do not
work in asynchronous contexts.

For instance if you end up needing to call return_layout in
nfs_clear_inode(), then you will sooner or later deadlock, since that
can easily end up getting called from an rpciod context as part of a
call to nfs_put_open_context().

  Trond



More information about the pNFS mailing list