| To: | Eric Sandeen <sandeen@xxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH, RFC] xfs: add heuristic to flush on rename |
| From: | Christoph Hellwig <hch@xxxxxxxxxxxxx> |
| Date: | Fri, 25 Apr 2014 12:55:28 -0700 |
| Cc: | xfs-oss <xfs@xxxxxxxxxxx> |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <535ABA9D.2060305@xxxxxxxxxx> |
| References: | <535ABA9D.2060305@xxxxxxxxxx> |
| User-agent: | Mutt/1.5.21 (2010-09-15) |
> + /*
> + * If we are renaming a just-written file over an existing
> + * file, be pedantic and flush it out if it looks like somebody
> + * is doing a tmpfile dance, and didn't fsync. Best effort;
> + * ignore errors.
> + */
> + if (new_inode) {
> + xfs_inode_t *ip = XFS_I(odentry->d_inode);
> +
> + if (VN_DIRTY(VFS_I(ip)) && ip->i_delayed_blks > 0)
> + filemap_flush(new_inode->i_mapping);
> + }
IFF we want a heuristic it should be a proper filemap_write_and_wait. a
non-blocking start of I/O without waiting for it is snake oil.
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH, RFC] xfs: add heuristic to flush on rename, Eric Sandeen |
|---|---|
| Next by Date: | Re: [PATCH, RFC] xfs: add heuristic to flush on rename, Eric Sandeen |
| Previous by Thread: | [PATCH, RFC] xfs: add heuristic to flush on rename, Eric Sandeen |
| Next by Thread: | Re: [PATCH, RFC] xfs: add heuristic to flush on rename, Eric Sandeen |
| Indexes: | [Date] [Thread] [Top] [All Lists] |