linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: David Sterba <dsterba@suse.cz>
Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	Josef Bacik <jbacik@fb.com>
Subject: linux-next: manual merge of the btrfs-kdave tree with Linus' tree
Date: Tue, 5 Apr 2016 10:32:47 +1000	[thread overview]
Message-ID: <20160405103247.2b57e676@canb.auug.org.au> (raw)

Hi David,

Today's linux-next merge of the btrfs-kdave tree got a conflict in:

  fs/btrfs/file.c

between commit:

  09cbfeaf1a5a ("mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros")

from Linus' tree and commit:

  201c5fdc44d7 ("Btrfs: don't do nocow check unless we have to")

from the btrfs-kdave tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc fs/btrfs/file.c
index cf31a60c6284,1bc8d464d415..000000000000
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@@ -1534,30 -1534,30 +1534,30 @@@ static noinline ssize_t __btrfs_buffere
  		reserve_bytes = round_up(write_bytes + sector_offset,
  				root->sectorsize);
  
- 		if ((BTRFS_I(inode)->flags & (BTRFS_INODE_NODATACOW |
- 					      BTRFS_INODE_PREALLOC)) &&
- 		    check_can_nocow(inode, pos, &write_bytes) > 0) {
- 			/*
- 			 * For nodata cow case, no need to reserve
- 			 * data space.
- 			 */
- 			only_release_metadata = true;
- 			/*
- 			 * our prealloc extent may be smaller than
- 			 * write_bytes, so scale down.
- 			 */
- 			num_pages = DIV_ROUND_UP(write_bytes + offset,
- 						 PAGE_SIZE);
- 			reserve_bytes = round_up(write_bytes + sector_offset,
- 					root->sectorsize);
- 			goto reserve_metadata;
- 		}
- 
  		ret = btrfs_check_data_free_space(inode, pos, write_bytes);
- 		if (ret < 0)
- 			break;
+ 		if (ret < 0) {
+ 			if ((BTRFS_I(inode)->flags & (BTRFS_INODE_NODATACOW |
+ 						      BTRFS_INODE_PREALLOC)) &&
+ 			    check_can_nocow(inode, pos, &write_bytes) > 0) {
+ 				/*
+ 				 * For nodata cow case, no need to reserve
+ 				 * data space.
+ 				 */
+ 				only_release_metadata = true;
+ 				/*
+ 				 * our prealloc extent may be smaller than
+ 				 * write_bytes, so scale down.
+ 				 */
+ 				num_pages = DIV_ROUND_UP(write_bytes + offset,
 -							 PAGE_CACHE_SIZE);
++							 PAGE_SIZE);
+ 				reserve_bytes = round_up(write_bytes +
+ 							 sector_offset,
+ 							 root->sectorsize);
+ 			} else {
+ 				break;
+ 			}
+ 		}
  
- reserve_metadata:
  		ret = btrfs_delalloc_reserve_metadata(inode, reserve_bytes);
  		if (ret) {
  			if (!only_release_metadata)

             reply	other threads:[~2016-04-05  0:32 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-05  0:32 Stephen Rothwell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-09-19 11:31 linux-next: manual merge of the btrfs-kdave tree with Linus' tree Mark Brown
2019-09-23 11:59 ` David Sterba
2018-02-06 23:49 Stephen Rothwell
2018-02-06 23:45 Stephen Rothwell
2017-08-24 23:58 Stephen Rothwell
2017-09-04  6:02 ` Stephen Rothwell
2017-07-24  0:54 Stephen Rothwell
2017-07-18  0:18 Stephen Rothwell
2017-07-21 13:49 ` David Sterba
2016-12-14 23:25 Stephen Rothwell
2016-09-05  1:47 Stephen Rothwell
2016-04-05  0:32 Stephen Rothwell
2016-04-05  0:32 Stephen Rothwell
2016-02-01 23:22 Stephen Rothwell
2016-02-02  5:16 ` Chandan Rajendra

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=20160405103247.2b57e676@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=dsterba@suse.cz \
    --cc=jbacik@fb.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).