Linux-Next Archive on lore.kernel.org
 help / color / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	Christoph Hellwig <hch@lst.de>,
	David Chinner <david@fromorbit.com>,
	xfs-masters@oss.sgi.com
Subject: linux-next: manual merge of the vfs tree with the xfs tree
Date: Mon, 26 Jul 2010 11:51:16 +1000
Message-ID: <20100726115116.1e6de038.sfr@canb.auug.org.au> (raw)

Hi Al,

[These became irrelevant when I reverted the xfs tree for a build error,
but will be done when the xfs tree is fixed.]

Today's linux-next merge of the vfs tree got a conflict in
fs/xfs/linux-2.6/xfs_aops.c between commit
7346e1197eb76e22199b6b4625f129331e0fd7ac ("xfs simplify and speed up
direct I/O completions") from the xfs tree and commit
b682ce06449c35a85dc5e63fcaab7dba2ba6df9b ("sort out blockdev_direct_IO
variants") from the vfs tree.

Also between commit 6f6b39eb706f5617750cf02952e4e6d7470c40bf ("xfs: use
GFP_NOFS for page cache allocation") from the xfs tree and commit
4478b21470275454f9eb6f590dfe7cc54d643978 ("get rid of
block_write_begin_newtrunc") from the vfs tree.

I fixed them up (I think - see below) and can carry the fix as necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc fs/xfs/linux-2.6/xfs_aops.c
index d24e78f,77a9ecc..0000000
--- a/fs/xfs/linux-2.6/xfs_aops.c
+++ b/fs/xfs/linux-2.6/xfs_aops.c
@@@ -1471,26 -1655,22 +1471,26 @@@ xfs_vm_direct_IO
  	loff_t			offset,
  	unsigned long		nr_segs)
  {
 -	struct file	*file = iocb->ki_filp;
 -	struct inode	*inode = file->f_mapping->host;
 -	struct block_device *bdev;
 -	ssize_t		ret;
 -
 -	bdev = xfs_find_bdev_for_inode(inode);
 -
 -	iocb->private = xfs_alloc_ioend(inode, rw == WRITE ?
 -					IO_UNWRITTEN : IO_READ);
 -
 -	ret = __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset,
 -				   nr_segs, xfs_get_blocks_direct,
 -				   xfs_end_io_direct, NULL, 0);
 +	struct inode		*inode = iocb->ki_filp->f_mapping->host;
 +	struct block_device	*bdev = xfs_find_bdev_for_inode(inode);
 +	ssize_t			ret;
 +
 +	if (rw & WRITE) {
 +		iocb->private = xfs_alloc_ioend(inode, IO_NEW);
 +
- 		ret = blockdev_direct_IO_no_locking(rw, iocb, inode, bdev, iov,
- 						    offset, nr_segs,
- 						    xfs_get_blocks_direct,
- 						    xfs_end_io_direct_write);
++		ret = __blockdev_direct_IO(rw, iocb, inode, bdev, iov,
++					   offset, nr_segs,
++					   xfs_get_blocks_direct,
++					   xfs_end_io_direct_write, NULL, 0);
 +		if (ret != -EIOCBQUEUED && iocb->private)
 +			xfs_destroy_ioend(iocb->private);
 +	} else {
- 		ret = blockdev_direct_IO_no_locking(rw, iocb, inode, bdev, iov,
- 						    offset, nr_segs,
- 						    xfs_get_blocks_direct,
- 						    NULL);
++		ret = __blockdev_direct_IO(rw, iocb, inode, bdev, iov,
++					   offset, nr_segs,
++					   xfs_get_blocks_direct,
++					   NULL, NULL, 0);
 +	}
  
 -	if (unlikely(ret != -EIOCBQUEUED && iocb->private))
 -		xfs_destroy_ioend(iocb->private);
  	return ret;
  }
  
@@@ -1504,9 -1700,31 +1520,31 @@@ xfs_vm_write_begin
  	struct page		**pagep,
  	void			**fsdata)
  {
- 	*pagep = NULL;
- 	return block_write_begin(file, mapping, pos, len, flags | AOP_FLAG_NOFS,
- 				 pagep, fsdata, xfs_get_blocks);
+ 	int			ret;
+ 
 -	ret = block_write_begin(mapping, pos, len, flags, pagep,
++	ret = block_write_begin(mapping, pos, len, flags | AOP_FLAG_NOFS, pagep,
+ 				xfs_get_blocks);
+ 	if (unlikely(ret))
+ 		xfs_vm_write_failed(mapping, pos + len);
+ 	return ret;
+ }
+ 
+ STATIC int
+ xfs_vm_write_end(
+ 	struct file		*file,
+ 	struct address_space	*mapping,
+ 	loff_t			pos,
+ 	unsigned		len,
+ 	unsigned		copied,
+ 	struct page		*page,
+ 	void			*fsdata)
+ {
+ 	int			ret;
+ 
+ 	ret = generic_write_end(file, mapping, pos, len, copied, page, fsdata);
+ 	if (unlikely(ret < len))
+ 		xfs_vm_write_failed(mapping, pos + len);
+ 	return ret;
  }
  
  STATIC sector_t

             reply index

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-26  1:51 Stephen Rothwell [this message]
2010-07-26  3:59 ` Dave Chinner
2010-07-26  4:05   ` Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2021-04-19  0:49 Stephen Rothwell
2021-04-20 16:40 ` Darrick J. Wong
2021-04-12  2:22 Stephen Rothwell
2021-04-13 15:20 ` Darrick J. Wong
2018-10-31  0:52 Stephen Rothwell
2018-10-31  1:12 ` Dave Chinner
2016-12-11 23:19 Stephen Rothwell
2015-11-10 23:21 Stephen Rothwell
2015-04-14  1:34 Stephen Rothwell
2015-04-13  1:57 Stephen Rothwell
2015-04-13  2:12 ` Dave Chinner
2011-07-18  3:36 Stephen Rothwell
2011-07-19  1:29 ` Dave Chinner
2010-07-05  0:02 Stephen Rothwell
2010-07-07  1:48 ` Christoph Hellwig
2010-07-07  3:50   ` Stephen Rothwell
2010-08-04  1:54 ` Stephen Rothwell

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=20100726115116.1e6de038.sfr@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=david@fromorbit.com \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=viro@ZenIV.linux.org.uk \
    --cc=xfs-masters@oss.sgi.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

Linux-Next Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-next/0 linux-next/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-next linux-next/ https://lore.kernel.org/linux-next \
		linux-next@vger.kernel.org
	public-inbox-index linux-next

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-next


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git