Re: gfs2 iomap: BUG_ON(buffer_unmapped) in submit_bh_wbc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 24, 2018 at 08:05:03PM +0200, Andreas Gruenbacher wrote:
> Approach (1) is quite trivial:
> 
> --- a/fs/buffer.c
> +++ b/fs/buffer.c
> @@ -1908,7 +1908,7 @@ iomap_to_bh(struct inode *inode, sector_t,
> struct buffer_head *bh,
>                 set_buffer_unwritten(bh);
>                 /* FALLTHRU */
>         case IOMAP_MAPPED:
> -               if (offset >= i_size_read(inode))
> +               if ((iomap->flags & IOMAP_F_NEW) || offset >=
> i_size_read(inode))
>                         set_buffer_new(bh);
>                 bh->b_blocknr = (iomap->addr + offset - iomap->offset) >>
>                                 inode->i_blkbits;
> 

This is the right thing to do.  We just didn't need to do it for XFS
as we'll never allocate normal blocks in write_begin.

You'll probably need similar tweaks in my new iomap write code, which
you're hopefully lookin into as well.



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux