Re: [RFC] atomic create+open

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > > The reason why we do it as a lookup intent is because this has to be
> > > atomic lookup+create+open in order to be at all useful to NFS.
> > 
> > Oh, and btw there's a problem with atomic lookup+create+open: mounts.
> > Do you want to follow mounts inside ->lookup().  Ugly.
> 
> No. Why do you think you would need to? The VFS is supposed to protect
> you against races with mount and other local objects (dcache races,
> inode races,...). The problem is remote objects.

Say you have NFS mount on /mnt and a bind mount over the regular file
/mnt/foo.  You do open("/mnt/foo", O_RDWR | O_CREAT, 0644).  How do
you solve the atomic open case.

If you open in ->lookup("foo") you will be opening the wrong file,
unless you want to follow mounts inside ->lookup.

Miklos
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux