From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Date: Mon, 24 Apr 2023 08:22:20 +0200 Subject: [Cluster-devel] [PATCH 11/17] iomap: assign current->backing_dev_info in iomap_file_buffered_write In-Reply-To: <20230424061825.GO360889@frogsfrogsfrogs> References: <20230424054926.26927-1-hch@lst.de> <20230424054926.26927-12-hch@lst.de> <20230424061825.GO360889@frogsfrogsfrogs> Message-ID: <20230424062220.GA10368@lst.de> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Sun, Apr 23, 2023 at 11:18:25PM -0700, Darrick J. Wong wrote: > > @@ -876,8 +877,11 @@ iomap_file_buffered_write(struct kiocb *iocb, struct iov_iter *i, > > if (iocb->ki_flags & IOCB_NOWAIT) > > iter.flags |= IOMAP_NOWAIT; > > > > + current->backing_dev_info = inode_to_bdi(iter.inode); > > Dumb question from me late on a Sunday night, but does the iomap_unshare > code need to set this too? Since it works by dirtying pagecache folios > without actually changing the contents? A very good question that I have no answer for. The current->backing_dev_info mechanism confuses the heck out of me and appears basically undocumented.