All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve French <smfltc@us.ibm.com>
To: Zach Brown <zach.brown@oracle.com>
Cc: Dave Kleikamp <shaggy@austin.ibm.com>,
	linux-fsdevel@vger.kernel.org,
	Shirish S Pargaonkar <shirishp@us.ibm.com>
Subject: Re: What trigge fsync of file on last close of the open inode?
Date: Wed, 04 Oct 2006 10:13:45 -0500	[thread overview]
Message-ID: <4523CFA9.7030200@us.ibm.com> (raw)
In-Reply-To: <4522D30E.7080505@oracle.com>

Zach Brown wrote:
> Steve French wrote:
>   
>> Dave Kleikamp wrote:
>>     
>>>> Someone had reported a problem with a writepages call coming in on
>>>> with no open files (so presumably the file was closed, with dirty
>>>> pages not written).
>>>>         
>
> So is the problem that you're getting a cifs_writepages() call after
> cifs_close() returns?
>
>
>   
Probably - I could not see any other path that could cause that cifs 
error to be logged to dmesg

>> May be a case in which filemap_fdatawrite returns before the write(s) is
>> sent to the vfs and write races with close (although cifs will defer a
>> file close if a write is pending on that handle)?
>>     
>
> Are writes to mmap()ed regions involved at all?  They lead to pages
> being dirtied at unmapping and eventually hitting ->writepage,
> potentially after ->flush and ->release have been called.
>
>   
I don't think so - but the person reporting it did not give much 
information, and the error
is not something that I have been seeing so I can't draw conclusions 
about that.
> I imagine you could force writeback of dirty pages in ->release so that
> you don't wait for writeback to come around and hit them.  Heck, it
> might be doing this already.  I didn't look very hard :).
>   
filemap_fdatawrite is called in cifs flush (which I verified is called 
just before close) and
close will be delayed (not sent over the network) if a write is pending 
on that file handle but
there may be two possibilities:

1) the page gets dirty while it is being released (between 
fput->->cifs_flush and fput->cifs_close)
2) filemap_fdatawrite did not flush the pages fast enough - and needs to 
be changed to
the filemap write and wait variant of the call in this location.

  parent reply	other threads:[~2006-10-04 15:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-03 19:53 What trigge fsync of file on last close of the open inode? Steve French
2006-10-03 20:05 ` Dave Kleikamp
2006-10-03 20:45   ` Steve French
2006-10-03 21:15     ` Zach Brown
2006-10-03 21:40       ` Dave Kleikamp
2006-10-03 23:43         ` Zach Brown
2006-10-04 15:13       ` Steve French [this message]
2006-10-03 23:13     ` Jeremy Allison
2006-10-04 20:46       ` Trond Myklebust

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=4523CFA9.7030200@us.ibm.com \
    --to=smfltc@us.ibm.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=shaggy@austin.ibm.com \
    --cc=shirishp@us.ibm.com \
    --cc=zach.brown@oracle.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.