xfs
[Top] [All Lists]

linux-next: manual merge of the xfs tree with the ext4 tree

To: David Chinner <david@xxxxxxxxxxxxx>, xfs@xxxxxxxxxxx
Subject: linux-next: manual merge of the xfs tree with the ext4 tree
From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Date: Thu, 10 Mar 2016 10:40:56 +1100
Cc: linux-next@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, Jan Kara <jack@xxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=canb.auug.org.au; s=201601; t=1457566856; bh=FTn+pqA02LrGgeTkgB0Q6HdvOByEV2aXAXDzEPLbvkA=; h=Date:From:To:Cc:Subject:From; b=Q4pzQUOr4LjEaBH6zRkML6d+dyaK06GzUjbMg6UknY3bka3Xyhv3uPPZIRxNuXefp 07YYJFn9wnECyk2Uq9C36C/sulFmJNztDDG0T3d5hVgNZgVxhiHCa+z6C+SivkncBL ZtxnGkbKCpbgds/ghvH5hKj/iPGepag1flIa8o6g=
Hi all,

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

  fs/ext4/inode.c

between commit:

  109811c20fb8 ("ext4: simplify io_end handling for AIO DIO")

from the ext4 tree and commit:

  74c66bcb7eda ("ext4: Fix data exposure after failed AIO DIO")

from the xfs tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell

diff --cc fs/ext4/inode.c
index 719accce152a,2b98171a9432..000000000000
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@@ -3285,10 -3161,10 +3285,10 @@@ out
  }
  #endif
  
- static void ext4_end_io_dio(struct kiocb *iocb, loff_t offset,
+ static int ext4_end_io_dio(struct kiocb *iocb, loff_t offset,
                            ssize_t size, void *private)
  {
 -        ext4_io_end_t *io_end = iocb->private;
 +        ext4_io_end_t *io_end = private;
  
        /* if not async direct IO just return */
        if (!io_end)
@@@ -3296,8 -3172,18 +3296,16 @@@
  
        ext_debug("ext4_end_io_dio(): io_end 0x%p "
                  "for inode %lu, iocb 0x%p, offset %llu, size %zd\n",
 -                iocb->private, io_end->inode->i_ino, iocb, offset,
 -                size);
 +                io_end, io_end->inode->i_ino, iocb, offset, size);
  
 -      iocb->private = NULL;
+       /*
+        * Error during AIO DIO. We cannot convert unwritten extents as the
+        * data was not written. Just clear the unwritten flag and drop io_end.
+        */
+       if (size <= 0) {
+               ext4_clear_io_unwritten_flag(io_end);
+               size = 0;
+       }
        io_end->offset = offset;
        io_end->size = size;
        ext4_put_io_end(io_end);

<Prev in Thread] Current Thread [Next in Thread>