Re: [PATCH 2/2] CIFS: Simplify invalidate part (try #2)

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

 



2011/4/22 Jeff Layton <jlayton@xxxxxxxxxx>:
> On Fri, 22 Apr 2011 12:09:20 +0400
> Pavel Shilovsky <piastry@xxxxxxxxxxx> wrote:
>
>> After conversation with Steve, we decided to drop
>> filemap_write_and_wait from getattr, because we already do it in
>> cifs_file_aio_write. I also think that we should drop it from
>> cifs_llseek in this case too. I will repost this patch later (launder
>> page operation patch was merged earlier).
>>
>
> I wasn't privy to this discussion, but that makes no sense to me. Just
> because we initiated writeout in cifs_file_aio_write, does not mean
> that it's complete. If it's not complete then the size returned by the
> server may be bogus.
>

We call filemap_fdatawrite -> __filemap_fdatawrite(WB_SYNC_ALL) ->
__filemap_fdatawrite_range(WB_SYNC_ALL) -> do_writepages ->
cifs_writepages.

cifs_writepages with WB_SYNC_ALL is sync operations (even with you
async writepages set) - so we always get correct filesize from the
server. If the write from another process is in progress now, we don't
get better results to issues filemap_write_and_wait because another
process can dirty pages after this but before we request getattr to
the server.

-- 
Best regards,
Pavel Shilovsky.
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

  Powered by Linux