Re: linux-next: manual merge of the block tree with Linus' tree

Previous thread: Re: [PATCH 0/8] padata: fixes/cleanups by Andrew Morton on Thursday, April 29, 2010 - 4:13 pm. (1 message)

Next thread: linux-next: build failure after merge of the final tree (usb tree related) by Stephen Rothwell on Thursday, April 29, 2010 - 11:05 pm. (7 messages)
From: Stephen Rothwell
Date: Wednesday, April 28, 2010 - 8:52 pm

Hi Jens,

Today's linux-next merge of the block tree got a conflict in
fs/block_dev.c between commit b8af67e2681c693a21f3933e3bdfce4cf66596d3
("fs/block_dev.c: fix performance regression in O_DIRECT|O_SYNC writes to
block devices") from Linus' tree and commit
fbd9b09a177a481eda256447c881f014f29034fe ("blkdev: generalize flags for
blkdev_issue_fn functions") from the block tree.

I fixed it up (see below) and can carry the fix for a while.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc fs/block_dev.c
index 6dcee88,dd76930..0000000
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@@ -406,23 -406,17 +406,24 @@@ static loff_t block_llseek(struct file 
   
  int blkdev_fsync(struct file *filp, struct dentry *dentry, int datasync)
  {
 -	struct block_device *bdev = I_BDEV(filp->f_mapping->host);
 +	struct inode *bd_inode = filp->f_mapping->host;
 +	struct block_device *bdev = I_BDEV(bd_inode);
  	int error;
  
 -	error = sync_blockdev(bdev);
 -	if (error)
 -		return error;
 -	
 +	/*
 +	 * There is no need to serialise calls to blkdev_issue_flush with
 +	 * i_mutex and doing so causes performance issues with concurrent
 +	 * O_SYNC writers to a block device.
 +	 */
 +	mutex_unlock(&bd_inode->i_mutex);
 +
- 	error = blkdev_issue_flush(bdev, NULL);
+ 	error = blkdev_issue_flush(bdev, GFP_KERNEL, NULL,
+ 				(BLKDEV_IFL_WAIT));
  	if (error == -EOPNOTSUPP)
  		error = 0;
 +
 +	mutex_lock(&bd_inode->i_mutex);
 +
  	return error;
  }
  EXPORT_SYMBOL(blkdev_fsync);
--

From: Jens Axboe
Date: Thursday, April 29, 2010 - 12:33 am

I'll merge -linus in to resolve this one so you don't have to carry this
fix.

-- 
Jens Axboe

--

Previous thread: Re: [PATCH 0/8] padata: fixes/cleanups by Andrew Morton on Thursday, April 29, 2010 - 4:13 pm. (1 message)

Next thread: linux-next: build failure after merge of the final tree (usb tree related) by Stephen Rothwell on Thursday, April 29, 2010 - 11:05 pm. (7 messages)