xfs: cleanup the read/write helper naming
Drop a few pointless aio_ prefixes. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
This commit is contained in:
committed by
Darrick J. Wong
parent
354be7e3b2
commit
ee1b218b09
@ -215,7 +215,7 @@ xfs_ilock_iocb(
|
|||||||
}
|
}
|
||||||
|
|
||||||
STATIC ssize_t
|
STATIC ssize_t
|
||||||
xfs_file_dio_aio_read(
|
xfs_file_dio_read(
|
||||||
struct kiocb *iocb,
|
struct kiocb *iocb,
|
||||||
struct iov_iter *to)
|
struct iov_iter *to)
|
||||||
{
|
{
|
||||||
@ -264,7 +264,7 @@ xfs_file_dax_read(
|
|||||||
}
|
}
|
||||||
|
|
||||||
STATIC ssize_t
|
STATIC ssize_t
|
||||||
xfs_file_buffered_aio_read(
|
xfs_file_buffered_read(
|
||||||
struct kiocb *iocb,
|
struct kiocb *iocb,
|
||||||
struct iov_iter *to)
|
struct iov_iter *to)
|
||||||
{
|
{
|
||||||
@ -299,9 +299,9 @@ xfs_file_read_iter(
|
|||||||
if (IS_DAX(inode))
|
if (IS_DAX(inode))
|
||||||
ret = xfs_file_dax_read(iocb, to);
|
ret = xfs_file_dax_read(iocb, to);
|
||||||
else if (iocb->ki_flags & IOCB_DIRECT)
|
else if (iocb->ki_flags & IOCB_DIRECT)
|
||||||
ret = xfs_file_dio_aio_read(iocb, to);
|
ret = xfs_file_dio_read(iocb, to);
|
||||||
else
|
else
|
||||||
ret = xfs_file_buffered_aio_read(iocb, to);
|
ret = xfs_file_buffered_read(iocb, to);
|
||||||
|
|
||||||
if (ret > 0)
|
if (ret > 0)
|
||||||
XFS_STATS_ADD(mp, xs_read_bytes, ret);
|
XFS_STATS_ADD(mp, xs_read_bytes, ret);
|
||||||
@ -316,7 +316,7 @@ xfs_file_read_iter(
|
|||||||
* if called for a direct write beyond i_size.
|
* if called for a direct write beyond i_size.
|
||||||
*/
|
*/
|
||||||
STATIC ssize_t
|
STATIC ssize_t
|
||||||
xfs_file_aio_write_checks(
|
xfs_file_write_checks(
|
||||||
struct kiocb *iocb,
|
struct kiocb *iocb,
|
||||||
struct iov_iter *from,
|
struct iov_iter *from,
|
||||||
int *iolock)
|
int *iolock)
|
||||||
@ -501,7 +501,7 @@ static const struct iomap_dio_ops xfs_dio_write_ops = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* xfs_file_dio_aio_write - handle direct IO writes
|
* xfs_file_dio_write - handle direct IO writes
|
||||||
*
|
*
|
||||||
* Lock the inode appropriately to prepare for and issue a direct IO write.
|
* Lock the inode appropriately to prepare for and issue a direct IO write.
|
||||||
* By separating it from the buffered write path we remove all the tricky to
|
* By separating it from the buffered write path we remove all the tricky to
|
||||||
@ -526,7 +526,7 @@ static const struct iomap_dio_ops xfs_dio_write_ops = {
|
|||||||
* negative return values.
|
* negative return values.
|
||||||
*/
|
*/
|
||||||
STATIC ssize_t
|
STATIC ssize_t
|
||||||
xfs_file_dio_aio_write(
|
xfs_file_dio_write(
|
||||||
struct kiocb *iocb,
|
struct kiocb *iocb,
|
||||||
struct iov_iter *from)
|
struct iov_iter *from)
|
||||||
{
|
{
|
||||||
@ -548,7 +548,7 @@ xfs_file_dio_aio_write(
|
|||||||
/*
|
/*
|
||||||
* Don't take the exclusive iolock here unless the I/O is unaligned to
|
* Don't take the exclusive iolock here unless the I/O is unaligned to
|
||||||
* the file system block size. We don't need to consider the EOF
|
* the file system block size. We don't need to consider the EOF
|
||||||
* extension case here because xfs_file_aio_write_checks() will relock
|
* extension case here because xfs_file_write_checks() will relock
|
||||||
* the inode as necessary for EOF zeroing cases and fill out the new
|
* the inode as necessary for EOF zeroing cases and fill out the new
|
||||||
* inode size as appropriate.
|
* inode size as appropriate.
|
||||||
*/
|
*/
|
||||||
@ -579,7 +579,7 @@ xfs_file_dio_aio_write(
|
|||||||
xfs_ilock(ip, iolock);
|
xfs_ilock(ip, iolock);
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = xfs_file_aio_write_checks(iocb, from, &iolock);
|
ret = xfs_file_write_checks(iocb, from, &iolock);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out;
|
goto out;
|
||||||
count = iov_iter_count(from);
|
count = iov_iter_count(from);
|
||||||
@ -589,7 +589,7 @@ xfs_file_dio_aio_write(
|
|||||||
* in-flight at the same time or we risk data corruption. Wait for all
|
* in-flight at the same time or we risk data corruption. Wait for all
|
||||||
* other IO to drain before we submit. If the IO is aligned, demote the
|
* other IO to drain before we submit. If the IO is aligned, demote the
|
||||||
* iolock if we had to take the exclusive lock in
|
* iolock if we had to take the exclusive lock in
|
||||||
* xfs_file_aio_write_checks() for other reasons.
|
* xfs_file_write_checks() for other reasons.
|
||||||
*/
|
*/
|
||||||
if (unaligned_io) {
|
if (unaligned_io) {
|
||||||
inode_dio_wait(inode);
|
inode_dio_wait(inode);
|
||||||
@ -633,7 +633,7 @@ xfs_file_dax_write(
|
|||||||
ret = xfs_ilock_iocb(iocb, iolock);
|
ret = xfs_ilock_iocb(iocb, iolock);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
ret = xfs_file_aio_write_checks(iocb, from, &iolock);
|
ret = xfs_file_write_checks(iocb, from, &iolock);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
@ -662,7 +662,7 @@ out:
|
|||||||
}
|
}
|
||||||
|
|
||||||
STATIC ssize_t
|
STATIC ssize_t
|
||||||
xfs_file_buffered_aio_write(
|
xfs_file_buffered_write(
|
||||||
struct kiocb *iocb,
|
struct kiocb *iocb,
|
||||||
struct iov_iter *from)
|
struct iov_iter *from)
|
||||||
{
|
{
|
||||||
@ -681,7 +681,7 @@ write_retry:
|
|||||||
iolock = XFS_IOLOCK_EXCL;
|
iolock = XFS_IOLOCK_EXCL;
|
||||||
xfs_ilock(ip, iolock);
|
xfs_ilock(ip, iolock);
|
||||||
|
|
||||||
ret = xfs_file_aio_write_checks(iocb, from, &iolock);
|
ret = xfs_file_write_checks(iocb, from, &iolock);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
@ -768,12 +768,12 @@ xfs_file_write_iter(
|
|||||||
* CoW. In all other directio scenarios we do not
|
* CoW. In all other directio scenarios we do not
|
||||||
* allow an operation to fall back to buffered mode.
|
* allow an operation to fall back to buffered mode.
|
||||||
*/
|
*/
|
||||||
ret = xfs_file_dio_aio_write(iocb, from);
|
ret = xfs_file_dio_write(iocb, from);
|
||||||
if (ret != -ENOTBLK)
|
if (ret != -ENOTBLK)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
return xfs_file_buffered_aio_write(iocb, from);
|
return xfs_file_buffered_write(iocb, from);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Reference in New Issue
Block a user