Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 51102ee5 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs

* 'for-linus' of git://oss.sgi.com/xfs/xfs: (49 commits)
  xfs simplify and speed up direct I/O completions
  xfs: move aio completion after unwritten extent conversion
  direct-io: move aio_complete into ->end_io
  xfs: fix big endian build
  xfs: clean up xfs_bmap_get_bp
  xfs: simplify xfs_truncate_file
  xfs: kill the b_strat callback in xfs_buf
  xfs: remove obsolete osyncisosync mount option
  xfs: clean up filestreams helpers
  xfs: fix gcc 4.6 set but not read and unused statement warnings
  xfs: Fix build when CONFIG_XFS_POSIX_ACL=n
  xfs: fix unsigned underflow in xfs_free_eofblocks
  xfs: use GFP_NOFS for page cache allocation
  xfs: fix memory reclaim recursion deadlock on locked inode buffer
  xfs: fix xfs_trans_add_item() lockdep warnings
  xfs: simplify and remove xfs_ireclaim
  xfs: don't block on buffer read errors
  xfs: move inode shrinker unregister even earlier
  xfs: remove a dmapi leftover
  xfs: writepage always has buffers
  ...
parents 54161df1 6b0a2996
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -131,17 +131,6 @@ When mounting an XFS filesystem, the following options are accepted.
	Don't check for double mounted file systems using the file system uuid.
	This is useful to mount LVM snapshot volumes.

  osyncisosync
	Make O_SYNC writes implement true O_SYNC.  WITHOUT this option,
	Linux XFS behaves as if an "osyncisdsync" option is used,
	which will make writes to files opened with the O_SYNC flag set
	behave as if the O_DSYNC flag had been used instead.
	This can result in better performance without compromising
	data safety.
	However if this option is not in effect, timestamp updates from
	O_SYNC writes can be lost if the system crashes.
	If timestamp updates are critical, use the osyncisosync option.

  uquota/usrquota/uqnoenforce/quota
	User disk quota accounting enabled, and limits (optionally)
	enforced.  Refer to xfs_quota(8) for further details.
+14 −12
Original line number Diff line number Diff line
@@ -218,7 +218,7 @@ static struct page *dio_get_page(struct dio *dio)
 * filesystems can use it to hold additional state between get_block calls and
 * dio_complete.
 */
static int dio_complete(struct dio *dio, loff_t offset, int ret)
static int dio_complete(struct dio *dio, loff_t offset, int ret, bool is_async)
{
	ssize_t transferred = 0;

@@ -239,14 +239,6 @@ static int dio_complete(struct dio *dio, loff_t offset, int ret)
			transferred = dio->i_size - offset;
	}

	if (dio->end_io && dio->result)
		dio->end_io(dio->iocb, offset, transferred,
			    dio->map_bh.b_private);

	if (dio->flags & DIO_LOCKING)
		/* lockdep: non-owner release */
		up_read_non_owner(&dio->inode->i_alloc_sem);

	if (ret == 0)
		ret = dio->page_errors;
	if (ret == 0)
@@ -254,6 +246,17 @@ static int dio_complete(struct dio *dio, loff_t offset, int ret)
	if (ret == 0)
		ret = transferred;

	if (dio->end_io && dio->result) {
		dio->end_io(dio->iocb, offset, transferred,
			    dio->map_bh.b_private, ret, is_async);
	} else if (is_async) {
		aio_complete(dio->iocb, ret, 0);
	}

	if (dio->flags & DIO_LOCKING)
		/* lockdep: non-owner release */
		up_read_non_owner(&dio->inode->i_alloc_sem);

	return ret;
}

@@ -277,8 +280,7 @@ static void dio_bio_end_aio(struct bio *bio, int error)
	spin_unlock_irqrestore(&dio->bio_lock, flags);

	if (remaining == 0) {
		int ret = dio_complete(dio, dio->iocb->ki_pos, 0);
		aio_complete(dio->iocb, ret, 0);
		dio_complete(dio, dio->iocb->ki_pos, 0, true);
		kfree(dio);
	}
}
@@ -1126,7 +1128,7 @@ direct_io_worker(int rw, struct kiocb *iocb, struct inode *inode,
	spin_unlock_irqrestore(&dio->bio_lock, flags);

	if (ret2 == 0) {
		ret = dio_complete(dio, offset, ret);
		ret = dio_complete(dio, offset, ret, false);
		kfree(dio);
	} else
		BUG_ON(ret != -EIOCBQUEUED);
+7 −3
Original line number Diff line number Diff line
@@ -3775,7 +3775,8 @@ static ext4_io_end_t *ext4_init_io_end (struct inode *inode, gfp_t flags)
}

static void ext4_end_io_dio(struct kiocb *iocb, loff_t offset,
			    ssize_t size, void *private)
			    ssize_t size, void *private, int ret,
			    bool is_async)
{
        ext4_io_end_t *io_end = iocb->private;
	struct workqueue_struct *wq;
@@ -3784,7 +3785,7 @@ static void ext4_end_io_dio(struct kiocb *iocb, loff_t offset,

	/* if not async direct IO or dio with 0 bytes write, just return */
	if (!io_end || !size)
		return;
		goto out;

	ext_debug("ext4_end_io_dio(): io_end 0x%p"
		  "for inode %lu, iocb 0x%p, offset %llu, size %llu\n",
@@ -3795,7 +3796,7 @@ static void ext4_end_io_dio(struct kiocb *iocb, loff_t offset,
	if (io_end->flag != EXT4_IO_UNWRITTEN){
		ext4_free_io_end(io_end);
		iocb->private = NULL;
		return;
		goto out;
	}

	io_end->offset = offset;
@@ -3812,6 +3813,9 @@ static void ext4_end_io_dio(struct kiocb *iocb, loff_t offset,
	list_add_tail(&io_end->list, &ei->i_completed_io_list);
	spin_unlock_irqrestore(&ei->i_completed_io_lock, flags);
	iocb->private = NULL;
out:
	if (is_async)
		aio_complete(iocb, ret, 0);
}

static void ext4_end_io_buffer_write(struct buffer_head *bh, int uptodate)
+6 −1
Original line number Diff line number Diff line
@@ -578,7 +578,9 @@ bail:
static void ocfs2_dio_end_io(struct kiocb *iocb,
			     loff_t offset,
			     ssize_t bytes,
			     void *private)
			     void *private,
			     int ret,
			     bool is_async)
{
	struct inode *inode = iocb->ki_filp->f_path.dentry->d_inode;
	int level;
@@ -592,6 +594,9 @@ static void ocfs2_dio_end_io(struct kiocb *iocb,
	if (!level)
		up_read(&inode->i_alloc_sem);
	ocfs2_rw_unlock(inode, level);

	if (is_async)
		aio_complete(iocb, ret, 0);
}

/*
+1 −3
Original line number Diff line number Diff line
@@ -87,11 +87,9 @@ xfs-y += xfs_alloc.o \
				   xfs_trans_buf.o \
				   xfs_trans_extfree.o \
				   xfs_trans_inode.o \
				   xfs_trans_item.o \
				   xfs_utils.o \
				   xfs_vnodeops.o \
				   xfs_rw.o \
				   xfs_dmops.o
				   xfs_rw.o

xfs-$(CONFIG_XFS_TRACE)		+= xfs_btree_trace.o

Loading