mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-18 02:20:59 +03:00
Const some unchanging variables in zfs_write
Show that these values will not be changing later. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Matt Macy <mmacy@FreeBSD.org> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Closes #11176
This commit is contained in:
parent
86e74dc162
commit
9585538d0e
@ -234,7 +234,7 @@ zfs_write(znode_t *zp, uio_t *uio, int ioflag, cred_t *cr)
|
||||
if (n == 0)
|
||||
return (0);
|
||||
|
||||
rlim64_t limit = MAXOFFSET_T;
|
||||
const rlim64_t limit = MAXOFFSET_T;
|
||||
|
||||
zfsvfs_t *zfsvfs = ZTOZSB(zp);
|
||||
ZFS_ENTER(zfsvfs);
|
||||
@ -278,7 +278,7 @@ zfs_write(znode_t *zp, uio_t *uio, int ioflag, cred_t *cr)
|
||||
return (SET_ERROR(EINVAL));
|
||||
}
|
||||
|
||||
int max_blksz = zfsvfs->z_max_blksz;
|
||||
const uint64_t max_blksz = zfsvfs->z_max_blksz;
|
||||
|
||||
/*
|
||||
* Pre-fault the pages to ensure slow (eg NFS) pages
|
||||
@ -582,7 +582,7 @@ zfs_write(znode_t *zp, uio_t *uio, int ioflag, cred_t *cr)
|
||||
zfsvfs->z_os->os_sync == ZFS_SYNC_ALWAYS)
|
||||
zil_commit(zilog, zp->z_id);
|
||||
|
||||
int64_t nwritten = start_resid - uio->uio_resid;
|
||||
const int64_t nwritten = start_resid - uio->uio_resid;
|
||||
dataset_kstats_update_write_kstats(&zfsvfs->z_kstat, nwritten);
|
||||
task_io_account_write(nwritten);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user