Thread (14 messages) 14 messages, 2 authors, 2017-04-12

Re: [PATCH 1/9] Use RWF_* flags for AIO operations

flat view

From: Christoph Hellwig <hidden>
Date: 2017-04-12 08:33:09
Also in: linux-block, linux-btrfs, linux-ext4, linux-fsdevel, linux-xfs

quoted hunk ↗ jump to hunk
 
+	if (unlikely(iocb->aio_rw_flags & ~(RWF_HIPRI | RWF_DSYNC | RWF_SYNC))) {
+		pr_debug("EINVAL: aio_rw_flags set with incompatible flags\n");
+		return -EINVAL;
+	}
quoted hunk ↗ jump to hunk
+	if (iocb->aio_rw_flags & RWF_HIPRI)
+		req->common.ki_flags |= IOCB_HIPRI;
+	if (iocb->aio_rw_flags & RWF_DSYNC)
+		req->common.ki_flags |= IOCB_DSYNC;
+	if (iocb->aio_rw_flags & RWF_SYNC)
+		req->common.ki_flags |= (IOCB_DSYNC | IOCB_SYNC);
Pleae introduce a common helper to share this code between the
synchronous and the aio path
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help