Hello Pip,

Pip Cet:
> I've had a look at the relevant code in fs/namei.c, and it appears to me
> the problem is that lookup_open(), in the absence of an ->atomic_open
> method, falls back to creating a file with vfs_create, then opening it with
> vfs_open, which fails in this case. It's not clear to me what a good fix
> would be, though implementing ->atomic_open should work.

You analized very well.
I've tried implementing aufs atomic_open several years before, but it
was complicated and I decided that aufs doesn't support atomic_open.
It was not a big issue until now and I have not received such mail.
Something might changed recently?
- nfs4 becomes popular
- vfs or nfs4 internal implementation changed
No, the changes in outer world should not be related to this
problem. You reported other versions of aufs failed similarly. And I
guess aufs have never succeeded open(O_WRONLY|O_CREAT, 0400) on nfs4
branch.
Probably it is just a matter of fact that who report first.


> As an experiment, I've disabled nfs4's ->atomic_open method, and the result
> was that with the modified kernel, my test program fails even directly on
> the nfs file system. It still succeeds both directly on a ramfs and on an
> aufs using said ramfs, but that appears to be because ramfs has no ->open
> at all

Right.
I've confirmed nfs fh_verify() rejects open(O_WRONLY) for the already
created readonly file.

I think aufs should try supporting atomic_open (while it is complicated)
now. As a first step, would you try this patch? It is just to confirm
the scenario and prints a kern.info log where aufs should call
->atomic_open().
I'd ask you to try verious patterns. By this patch aufs will prints a
msg. In other words, when you see an error without the aufs log msg, it
means this first step is not good.


Thanx for good analysis and report

J. R. Okajima

Attachment: a.patch.bz2
Description: BZip2 compressed data

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF

Reply via email to