linux-um archives
 help / color / mirror / Atom feed
From: Jeff Dike <jdike@addtoit.com>
To: BlaisorBlade <blaisorblade_spam@yahoo.it>
Cc: user-mode-linux-devel@lists.sourceforge.net
Subject: [uml-devel] Re: The new filehandle abstraction: doubts and complaints
Date: Wed, 08 Sep 2004 20:22:23 -0400	[thread overview]
Message-ID: <200409090022.i890MNBP016031@ccure.user-mode-linux.org> (raw)
In-Reply-To: Your message of "Sun, 05 Sep 2004 18:04:31 +0200." <200408291307.11051.blaisorblade_spam@yahoo.it>

blaisorblade_spam@yahoo.it said:
> - locking is not complete: active_handle moves fh->list without
> holding  open_files_lock.  

Yup, good spotting.

> - is_reclaimable should become make_reclaimable: the name
> is_reclaimable  should be reserved for a function which says if the fd
> is reclaimable or not,  if that function is needed. 

Yeah, I've been looking suspiciously at that name.

> Probably we don't
> need this, but this is what  "is_reclaimable" makes me think: 

Don't add it until it's needed.

> - there is an implicit race between using a fd and closing it: there
> is no  reason why someone shouldn't be closing the fd while we are
> reading from it  (or just after it has been read from the struct and
> before we do the syscall,  more exactly). 

This is a different issue.  VFS should protect against that, as long as a
host inode always gets the same UML inode, even if you're looking at it 
through a different mount.  Part of that is using the same inode number
as the host, so that will always match up, which we do.  The other is the
superblock, which is also part of the inode hash.  This is done wrong - we
allocate a different superblock for every mount.

I'm wondering whether hostfs superblocks should correspond to host filesystems.
This would fix the coherency issue, but I don't know whether it would
break anything else.

> The patch I'm attaching contains some of the needed changes to the
> API,  without touching its users, because I don't know if my proposal
> will become  the actual API or not. 

That patch is trying to do a lot of things, and they're all mixed up with
each other.  Can you split it out a bit more?

				Jeff



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

      reply	other threads:[~2004-09-08 23:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-05 16:04 [uml-devel] The new filehandle abstraction: doubts and complaints BlaisorBlade
2004-09-09  0:22 ` Jeff Dike [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200409090022.i890MNBP016031@ccure.user-mode-linux.org \
    --to=jdike@addtoit.com \
    --cc=blaisorblade_spam@yahoo.it \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox