qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* 9pfs: scope of rename_lock?
@ 2021-05-16 17:06 Christian Schoenebeck
  2021-05-21 11:59 ` Greg Kurz
  0 siblings, 1 reply; 4+ messages in thread
From: Christian Schoenebeck @ 2021-05-16 17:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: Greg Kurz

Hi Greg,

while reviewing the 9p code base for further optimizations, I stumbled over 
the 'rename_lock' introduced by 02cb7f3a2 and wondered about what exactly it 
shall protect?

As far as I understand it, the original intention at introduction 
(aforementioned 02cb7f3a2) was to protect

	1. fidp->path variable

	and

	2.  *ANY* filesystem path from being renamed during the *entire* duration
	    of some concurrent 9p operation.

So because of (2.) it was introduced as a global lock. But (2.) is a dead end 
approach anyway, isn't it?

Therefore my question: rename_lock is currently a global lock. Wouldn't it 
make more sense to transform it from a global lock from struct V9fsState -> 
struct V9fsFidState and just let it protect that fidp->path variable locally 
there?

Best regards,
Christian Schoenebeck




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-05-26 13:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-16 17:06 9pfs: scope of rename_lock? Christian Schoenebeck
2021-05-21 11:59 ` Greg Kurz
2021-05-25 11:41   ` Christian Schoenebeck
2021-05-26 13:41     ` Christian Schoenebeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).