All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Dave Chinner <david@fromorbit.com>, Goldwyn Rodrigues <rgoldwyn@suse.de>
Cc: Damien Le Moal <damien.lemoal@wdc.com>,
	Naohiro Aota <naohiro.aota@wdc.com>,
	Johannes Thumshirn <jth@kernel.org>,
	Matthew Wilcox <willy@infradead.org>,
	linux-btrfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	cluster-devel@redhat.com, linux-ext4@vger.kernel.org,
	linux-xfs@vger.kernel.org
Subject: [PATCH 1/3] xfs: use ENOTBLK for direct I/O to buffered I/O fallback
Date: Tue, 21 Jul 2020 20:31:55 +0200	[thread overview]
Message-ID: <20200721183157.202276-2-hch@lst.de> (raw)
In-Reply-To: <20200721183157.202276-1-hch@lst.de>

This is what the classic fs/direct-io.c implementation and thuse other
file systems use.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/xfs/xfs_file.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
index 00db81eac80d6c..a6ef90457abf97 100644
--- a/fs/xfs/xfs_file.c
+++ b/fs/xfs/xfs_file.c
@@ -505,7 +505,7 @@ xfs_file_dio_aio_write(
 		 */
 		if (xfs_is_cow_inode(ip)) {
 			trace_xfs_reflink_bounce_dio_write(ip, iocb->ki_pos, count);
-			return -EREMCHG;
+			return -ENOTBLK;
 		}
 		iolock = XFS_IOLOCK_EXCL;
 	} else {
@@ -714,7 +714,7 @@ xfs_file_write_iter(
 		 * allow an operation to fall back to buffered mode.
 		 */
 		ret = xfs_file_dio_aio_write(iocb, from);
-		if (ret != -EREMCHG)
+		if (ret != -ENOTBLK)
 			return ret;
 	}
 
-- 
2.27.0


WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@lst.de>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 1/3] xfs: use ENOTBLK for direct I/O to buffered I/O fallback
Date: Tue, 21 Jul 2020 20:31:55 +0200	[thread overview]
Message-ID: <20200721183157.202276-2-hch@lst.de> (raw)
In-Reply-To: <20200721183157.202276-1-hch@lst.de>

This is what the classic fs/direct-io.c implementation and thuse other
file systems use.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/xfs/xfs_file.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
index 00db81eac80d6c..a6ef90457abf97 100644
--- a/fs/xfs/xfs_file.c
+++ b/fs/xfs/xfs_file.c
@@ -505,7 +505,7 @@ xfs_file_dio_aio_write(
 		 */
 		if (xfs_is_cow_inode(ip)) {
 			trace_xfs_reflink_bounce_dio_write(ip, iocb->ki_pos, count);
-			return -EREMCHG;
+			return -ENOTBLK;
 		}
 		iolock = XFS_IOLOCK_EXCL;
 	} else {
@@ -714,7 +714,7 @@ xfs_file_write_iter(
 		 * allow an operation to fall back to buffered mode.
 		 */
 		ret = xfs_file_dio_aio_write(iocb, from);
-		if (ret != -EREMCHG)
+		if (ret != -ENOTBLK)
 			return ret;
 	}
 
-- 
2.27.0



  reply	other threads:[~2020-07-21 18:32 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-21 18:31 iomap write invalidation v2 Christoph Hellwig
2020-07-21 18:31 ` [Cluster-devel] " Christoph Hellwig
2020-07-21 18:31 ` Christoph Hellwig [this message]
2020-07-21 18:31   ` [Cluster-devel] [PATCH 1/3] xfs: use ENOTBLK for direct I/O to buffered I/O fallback Christoph Hellwig
2020-07-21 20:35   ` Darrick J. Wong
2020-07-21 20:35     ` [Cluster-devel] " Darrick J. Wong
2020-07-21 18:31 ` [PATCH 2/3] iomap: Only invalidate page cache pages on direct IO writes Christoph Hellwig
2020-07-21 18:31   ` [Cluster-devel] " Christoph Hellwig
2020-07-21 18:31 ` [PATCH 3/3] iomap: fall back to buffered writes for invalidation failures Christoph Hellwig
2020-07-21 18:31   ` [Cluster-devel] " Christoph Hellwig
2020-07-21 20:37   ` Darrick J. Wong
2020-07-21 20:37     ` [Cluster-devel] " Darrick J. Wong
2020-07-22  6:18     ` Christoph Hellwig
2020-07-22  6:18       ` [Cluster-devel] " Christoph Hellwig
2020-07-22 16:15       ` Darrick J. Wong
2020-07-22 16:15         ` [Cluster-devel] " Darrick J. Wong
2020-07-22 12:19     ` Bob Peterson
2020-07-22 12:19       ` Bob Peterson
2020-07-21 23:01   ` Damien Le Moal
2020-07-21 23:01     ` [Cluster-devel] " Damien Le Moal
2020-07-22 23:13   ` Darrick J. Wong
2020-07-22 23:13     ` [Cluster-devel] " Darrick J. Wong
2020-07-30  4:00     ` tytso
2020-07-30  4:00       ` [Cluster-devel] " tytso
2020-07-31  7:01   ` Ritesh Harjani
2020-07-31  7:01     ` [Cluster-devel] " Ritesh Harjani
2020-07-31 14:03   ` Andreas Gruenbacher
2020-07-31 14:03     ` Andreas Gruenbacher

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=20200721183157.202276-2-hch@lst.de \
    --to=hch@lst.de \
    --cc=cluster-devel@redhat.com \
    --cc=damien.lemoal@wdc.com \
    --cc=david@fromorbit.com \
    --cc=jth@kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=naohiro.aota@wdc.com \
    --cc=rgoldwyn@suse.de \
    --cc=willy@infradead.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.