All of lore.kernel.org
 help / color / mirror / Atom feed
* linux-next: manual merge of the block tree with the file-locks tree
@ 2017-06-21  3:17 Stephen Rothwell
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2017-06-21  3:17 UTC (permalink / raw)
  To: Jens Axboe, Jeff Layton
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Goldwyn Rodrigues

Hi all,

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

  fs/ext4/file.c

between commit:

  c37683e32cca ("ext4: add more robust reporting of metadata writeback errors")

from the file-locks tree and commit:

  728fbc0e10b7 ("ext4: nowait aio support")

from the block 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/ext4/file.c
index d41d3d0b4ef1,58e2eeaa0bc4..000000000000
--- a/fs/ext4/file.c
+++ b/fs/ext4/file.c
@@@ -435,13 -454,11 +454,17 @@@ static int ext4_file_open(struct inode 
  		if (ret < 0)
  			return ret;
  	}
+ 
+ 	/* Set the flags to support nowait AIO */
+ 	filp->f_mode |= FMODE_AIO_NOWAIT;
+ 
 -	return dquot_file_open(inode, filp);
 +	ret = dquot_file_open(inode, filp);
 +	if (!ret) {
 +		struct inode *bd_inode = sb->s_bdev->bd_inode;
 +
 +		filp->f_md_wb_err = filemap_sample_wb_err(bd_inode->i_mapping);
 +	}
 +	return ret;
  }
  
  /*

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: manual merge of the block tree with the file-locks tree
  2017-06-28  9:54   ` Jeff Layton
@ 2017-06-28 12:44     ` Jens Axboe
  0 siblings, 0 replies; 6+ messages in thread
From: Jens Axboe @ 2017-06-28 12:44 UTC (permalink / raw)
  To: Jeff Layton, Stephen Rothwell, Al Viro
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List

On 06/28/2017 03:54 AM, Jeff Layton wrote:
> On Tue, 2017-06-27 at 20:01 -0600, Jens Axboe wrote:
>> On 06/27/2017 07:57 PM, Stephen Rothwell wrote:
>>> Hi Jens,
>>>
>>> Today's linux-next merge of the block tree got a conflict in:
>>>
>>>   include/linux/fs.h
>>>
>>> between commit:
>>>
>>>   3f64df8a51ce ("fs: new infrastructure for writeback error handling and reporting")
>>>
>>> from the file-locks tree and commit:
>>>
>>>   c75b1d9421f8 ("fs: add fcntl() interface for setting/getting write life time hints")
>>>
>>> from the block tree.
>>
>> Looks like we stole the same hole! Let's just merge it like this, then
>> post merge I (or Jeff) can move the member to a better location.
>>
> 
> (cc'ing Al since he might pick these up...)
> 
> Indeed!
> 
> I'll plan to move f_wb_err to the end of the struct.
> 
> I have some later patches that add a second 32-bit errseq_t field to
> struct file for tracking metadata writeback errors. That would make them
> adjacent to one another which at least looks a little cleaner.

OK perfect, I'll just ignore the issue then :-)

-- 
Jens Axboe

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: manual merge of the block tree with the file-locks tree
  2017-06-28  2:01 ` Jens Axboe
@ 2017-06-28  9:54   ` Jeff Layton
  2017-06-28 12:44     ` Jens Axboe
  0 siblings, 1 reply; 6+ messages in thread
From: Jeff Layton @ 2017-06-28  9:54 UTC (permalink / raw)
  To: Jens Axboe, Stephen Rothwell, Al Viro
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List

On Tue, 2017-06-27 at 20:01 -0600, Jens Axboe wrote:
> On 06/27/2017 07:57 PM, Stephen Rothwell wrote:
> > Hi Jens,
> > 
> > Today's linux-next merge of the block tree got a conflict in:
> > 
> >   include/linux/fs.h
> > 
> > between commit:
> > 
> >   3f64df8a51ce ("fs: new infrastructure for writeback error handling and reporting")
> > 
> > from the file-locks tree and commit:
> > 
> >   c75b1d9421f8 ("fs: add fcntl() interface for setting/getting write life time hints")
> > 
> > from the block tree.
> 
> Looks like we stole the same hole! Let's just merge it like this, then
> post merge I (or Jeff) can move the member to a better location.
> 

(cc'ing Al since he might pick these up...)

Indeed!

I'll plan to move f_wb_err to the end of the struct.

I have some later patches that add a second 32-bit errseq_t field to
struct file for tracking metadata writeback errors. That would make them
adjacent to one another which at least looks a little cleaner.

Cheers,
-- 
Jeff Layton <jlayton@poochiereds.net>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: manual merge of the block tree with the file-locks tree
  2017-06-28  1:57 Stephen Rothwell
@ 2017-06-28  2:01 ` Jens Axboe
  2017-06-28  9:54   ` Jeff Layton
  0 siblings, 1 reply; 6+ messages in thread
From: Jens Axboe @ 2017-06-28  2:01 UTC (permalink / raw)
  To: Stephen Rothwell, Jeff Layton
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List

On 06/27/2017 07:57 PM, Stephen Rothwell wrote:
> Hi Jens,
> 
> Today's linux-next merge of the block tree got a conflict in:
> 
>   include/linux/fs.h
> 
> between commit:
> 
>   3f64df8a51ce ("fs: new infrastructure for writeback error handling and reporting")
> 
> from the file-locks tree and commit:
> 
>   c75b1d9421f8 ("fs: add fcntl() interface for setting/getting write life time hints")
> 
> from the block tree.

Looks like we stole the same hole! Let's just merge it like this, then
post merge I (or Jeff) can move the member to a better location.

-- 
Jens Axboe

^ permalink raw reply	[flat|nested] 6+ messages in thread

* linux-next: manual merge of the block tree with the file-locks tree
@ 2017-06-28  1:57 Stephen Rothwell
  2017-06-28  2:01 ` Jens Axboe
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2017-06-28  1:57 UTC (permalink / raw)
  To: Jens Axboe, Jeff Layton
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List

Hi Jens,

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

  include/linux/fs.h

between commit:

  3f64df8a51ce ("fs: new infrastructure for writeback error handling and reporting")

from the file-locks tree and commit:

  c75b1d9421f8 ("fs: add fcntl() interface for setting/getting write life time hints")

from the block 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 include/linux/fs.h
index 6830a4ea9eed,65adbddb3163..000000000000
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@@ -848,7 -856,7 +857,8 @@@ struct file 
  	 * Must not be taken from IRQ context.
  	 */
  	spinlock_t		f_lock;
 +	errseq_t		f_wb_err;
+ 	enum rw_hint		f_write_hint;
  	atomic_long_t		f_count;
  	unsigned int 		f_flags;
  	fmode_t			f_mode;
@@@ -2512,9 -2542,11 +2539,11 @@@ extern int write_inode_now(struct inod
  extern int filemap_fdatawrite(struct address_space *);
  extern int filemap_flush(struct address_space *);
  extern int filemap_fdatawait(struct address_space *);
 -extern void filemap_fdatawait_keep_errors(struct address_space *);
 +extern int filemap_fdatawait_keep_errors(struct address_space *mapping);
  extern int filemap_fdatawait_range(struct address_space *, loff_t lstart,
  				   loff_t lend);
+ extern bool filemap_range_has_page(struct address_space *, loff_t lstart,
+ 				  loff_t lend);
  extern int filemap_write_and_wait(struct address_space *mapping);
  extern int filemap_write_and_wait_range(struct address_space *mapping,
  				        loff_t lstart, loff_t lend);

^ permalink raw reply	[flat|nested] 6+ messages in thread

* linux-next: manual merge of the block tree with the file-locks tree
@ 2017-06-21  2:48 Stephen Rothwell
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2017-06-21  2:48 UTC (permalink / raw)
  To: Jens Axboe, Jeff Layton
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Goldwyn Rodrigues

Hi Jens,

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

  mm/filemap.c

between commit:

  0771875ac195 ("mm: don't TestClearPageError in __filemap_fdatawait_range")

from the file-locks tree and commit:

  7fc9e4722435 ("fs: Introduce filemap_range_has_page()")

from the block 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 mm/filemap.c
index d10017cc00de,742034e56100..000000000000
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@@ -386,7 -376,39 +386,39 @@@ int filemap_flush(struct address_space 
  }
  EXPORT_SYMBOL(filemap_flush);
  
+ /**
+  * filemap_range_has_page - check if a page exists in range.
+  * @mapping:           address space within which to check
+  * @start_byte:        offset in bytes where the range starts
+  * @end_byte:          offset in bytes where the range ends (inclusive)
+  *
+  * Find at least one page in the range supplied, usually used to check if
+  * direct writing in this range will trigger a writeback.
+  */
+ bool filemap_range_has_page(struct address_space *mapping,
+ 			   loff_t start_byte, loff_t end_byte)
+ {
+ 	pgoff_t index = start_byte >> PAGE_SHIFT;
+ 	pgoff_t end = end_byte >> PAGE_SHIFT;
+ 	struct pagevec pvec;
+ 	bool ret;
+ 
+ 	if (end_byte < start_byte)
+ 		return false;
+ 
+ 	if (mapping->nrpages == 0)
+ 		return false;
+ 
+ 	pagevec_init(&pvec, 0);
+ 	if (!pagevec_lookup(&pvec, mapping, index, 1))
+ 		return false;
+ 	ret = (pvec.pages[0]->index <= end);
+ 	pagevec_release(&pvec);
+ 	return ret;
+ }
+ EXPORT_SYMBOL(filemap_range_has_page);
+ 
 -static int __filemap_fdatawait_range(struct address_space *mapping,
 +static void __filemap_fdatawait_range(struct address_space *mapping,
  				     loff_t start_byte, loff_t end_byte)
  {
  	pgoff_t index = start_byte >> PAGE_SHIFT;

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-06-28 12:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-21  3:17 linux-next: manual merge of the block tree with the file-locks tree Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2017-06-28  1:57 Stephen Rothwell
2017-06-28  2:01 ` Jens Axboe
2017-06-28  9:54   ` Jeff Layton
2017-06-28 12:44     ` Jens Axboe
2017-06-21  2:48 Stephen Rothwell

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.