Re: [PATCH 1/6] CIFS: Make cifsFileInfo_put work with strict cache mode

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

 



2010/11/15 Jeff Layton <jlayton@xxxxxxxxxx>:
>
> Not directly related to your patch, but what exactly is the purpose of
> the "open_inode_helper"? It looks like "pile o' random junk that we do

I agree that we can replace it with simply calling get_query_info from
cifs_open.

> for non-posix opens". Maybe it would be best to eliminate that function
> altogether and further unify the posix and non-posix open code. Steve,
> care to comment?
>
> Now that I'm done ranting, I don't think the invalidate mapping call
> here is unnecessary. We will likely have already invalidated the cache
> during the d_revalidate phase, and you're going to do it again below in
> cifs_new_fileinfo.
>

I investigated it - you was right about unnecessary calling
cifs_invalidate_mapping from open_inode_helper and cifs_new_fileinfo.
But I found the following problem:

When we execute script close2_problem.py (see in attachment) several
times (e.x. for i in `seq 1 20`; do ./close2_problem.py; done) with
(!) cifsFYI switched off it shows 'a' instead of 'x' (about 1-2 times
for 20 runs). If we switch cifsFYI on it is almost always 'x' (true) -
I have caught 'a' in this case one or two times for many-many runs.
What do you think about it?

-- 
Best regards,
Pavel Shilovsky.
#!/bin/env python
#
# We have to mount the same share to test, test1, test2 directories that locate in the directory we
# execute this script from.

from os import open, close, O_RDWR, O_CREAT, write, read, O_RDONLY, O_WRONLY, O_TRUNC, lseek, SEEK_END, SEEK_SET

f = open('test/_test4321_', O_RDWR | O_CREAT | O_TRUNC)
close(f)

f1 = open('test1/_test4321_', O_RDWR)
write(f1, 'a')
close(f1)

f2 = open('test2/_test4321_', O_WRONLY)
write(f2, 'x')
close(f2)

f3 = open('test1/_test4321_', O_RDONLY)
print 'must be x:', read(f3, 1)

close(f3)

[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux