All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: linux-xfs@vger.kernel.org
Subject: [PATCH v2 4/5] xfs: free cowblocks and retry on buffered write ENOSPC
Date: Wed, 11 Jan 2017 12:54:08 -0500	[thread overview]
Message-ID: <1484157249-464-5-git-send-email-bfoster@redhat.com> (raw)
In-Reply-To: <1484157249-464-1-git-send-email-bfoster@redhat.com>

XFS runs an eofblocks reclaim scan before returning an ENOSPC error to
userspace for buffered writes. This facilitates aggressive speculative
preallocation without causing user visible side effects such as
premature ENOSPC.

Run a cowblocks scan in the same situation to reclaim lingering COW fork
preallocation throughout the filesystem.

Signed-off-by: Brian Foster <bfoster@redhat.com>
---
 fs/xfs/xfs_file.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
index bbb9eb6..ef7eaa6 100644
--- a/fs/xfs/xfs_file.c
+++ b/fs/xfs/xfs_file.c
@@ -655,6 +655,7 @@ xfs_file_buffered_aio_write(
 		eofb.eof_scan_owner = ip->i_ino; /* for locking */
 		eofb.eof_flags = XFS_EOF_FLAGS_SYNC;
 		xfs_icache_free_eofblocks(ip->i_mount, &eofb);
+		xfs_icache_free_cowblocks(ip->i_mount, &eofb);
 		goto write_retry;
 	}
 
-- 
2.7.4


  parent reply	other threads:[~2017-01-11 17:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-11 17:54 [PATCH v2 0/5] xfs: basic cow fork speculative preallocation Brian Foster
2017-01-11 17:54 ` [PATCH v2 1/5] xfs: refactor iomap delalloc existing extent search into helper Brian Foster
2017-01-11 17:54 ` [PATCH v2 2/5] xfs: logically separate iomap range from allocation range Brian Foster
2017-01-11 17:54 ` [PATCH v2 3/5] xfs: reuse iomap delalloc code for COW fork reservation Brian Foster
2017-01-13 17:13   ` Christoph Hellwig
2017-01-16 16:26     ` Brian Foster
2017-01-16 17:37       ` Christoph Hellwig
2017-01-16 19:04         ` Brian Foster
2017-01-11 17:54 ` Brian Foster [this message]
2017-01-13 17:12   ` [PATCH v2 4/5] xfs: free cowblocks and retry on buffered write ENOSPC Christoph Hellwig
2017-01-11 17:54 ` [PATCH v2 5/5] xfs: implement basic COW fork speculative preallocation Brian Foster
2017-01-13 17:13 ` [PATCH v2 0/5] xfs: basic cow " Christoph Hellwig
2017-01-16 16:26   ` Brian Foster

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=1484157249-464-5-git-send-email-bfoster@redhat.com \
    --to=bfoster@redhat.com \
    --cc=linux-xfs@vger.kernel.org \
    /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.