[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170412083308.GA22363@infradead.org>
Date: Wed, 12 Apr 2017 01:33:08 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Goldwyn Rodrigues <rgoldwyn@...e.de>
Cc: linux-fsdevel@...r.kernel.org, jack@...e.com, hch@...radead.org,
linux-block@...r.kernel.org, linux-btrfs@...r.kernel.org,
linux-ext4@...r.kernel.org, linux-xfs@...r.kernel.org,
sagi@...mberg.me, avi@...lladb.com, axboe@...nel.dk,
linux-api@...r.kernel.org, willy@...radead.org,
tom.leiming@...il.com, Goldwyn Rodrigues <rgoldwyn@...e.com>
Subject: Re: [PATCH 1/9] Use RWF_* flags for AIO operations
>
> + 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;
> + }
> + 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
Powered by blists - more mailing lists