瀏覽代碼

xfs: ioends require logically contiguous file offsets

We need to create a new ioend if the current writepage call isn't
logically contiguous with the range contained in the previous ioend.
Hopefully writepage gets called in order of increasing file offset.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Darrick J. Wong 9 年之前
父節點
當前提交
0df61da8ac
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      fs/xfs/xfs_aops.c

+ 2 - 1
fs/xfs/xfs_aops.c

@@ -520,7 +520,8 @@ xfs_add_to_ioend(
 	struct list_head	*iolist)
 	struct list_head	*iolist)
 {
 {
 	if (!wpc->ioend || wpc->io_type != wpc->ioend->io_type ||
 	if (!wpc->ioend || wpc->io_type != wpc->ioend->io_type ||
-	    bh->b_blocknr != wpc->last_block + 1) {
+	    bh->b_blocknr != wpc->last_block + 1 ||
+	    offset != wpc->ioend->io_offset + wpc->ioend->io_size) {
 		struct xfs_ioend	*new;
 		struct xfs_ioend	*new;
 
 
 		if (wpc->ioend)
 		if (wpc->ioend)