Merge commit 'refs/top-bases/zfs-branch' into zfs-branch
This commit is contained in:
commit
53e66eef5a
|
@ -181,7 +181,7 @@ dmu_bonus_hold(objset_t *os, uint64_t object, void *tag, dmu_buf_t **dbp)
|
|||
*/
|
||||
static int
|
||||
dmu_buf_hold_array_by_dnode(dnode_t *dn, uint64_t offset,
|
||||
uint64_t length, int read, void *tag, int *numbufsp, dmu_buf_t ***dbpp)
|
||||
uint64_t length, int rd, void *tag, int *numbufsp, dmu_buf_t ***dbpp)
|
||||
{
|
||||
dsl_pool_t *dp = NULL;
|
||||
dmu_buf_t **dbp;
|
||||
|
@ -231,7 +231,7 @@ dmu_buf_hold_array_by_dnode(dnode_t *dn, uint64_t offset,
|
|||
return (EIO);
|
||||
}
|
||||
/* initiate async i/o */
|
||||
if (read) {
|
||||
if (rd) {
|
||||
rw_exit(&dn->dn_struct_rwlock);
|
||||
(void) dbuf_read(db, zio, flags);
|
||||
rw_enter(&dn->dn_struct_rwlock, RW_READER);
|
||||
|
@ -251,7 +251,7 @@ dmu_buf_hold_array_by_dnode(dnode_t *dn, uint64_t offset,
|
|||
}
|
||||
|
||||
/* wait for other io to complete */
|
||||
if (read) {
|
||||
if (rd) {
|
||||
for (i = 0; i < nblks; i++) {
|
||||
dmu_buf_impl_t *db = (dmu_buf_impl_t *)dbp[i];
|
||||
mutex_enter(&db->db_mtx);
|
||||
|
@ -275,7 +275,7 @@ dmu_buf_hold_array_by_dnode(dnode_t *dn, uint64_t offset,
|
|||
|
||||
static int
|
||||
dmu_buf_hold_array(objset_t *os, uint64_t object, uint64_t offset,
|
||||
uint64_t length, int read, void *tag, int *numbufsp, dmu_buf_t ***dbpp)
|
||||
uint64_t length, int rd, void *tag, int *numbufsp, dmu_buf_t ***dbpp)
|
||||
{
|
||||
dnode_t *dn;
|
||||
int err;
|
||||
|
@ -284,7 +284,7 @@ dmu_buf_hold_array(objset_t *os, uint64_t object, uint64_t offset,
|
|||
if (err)
|
||||
return (err);
|
||||
|
||||
err = dmu_buf_hold_array_by_dnode(dn, offset, length, read, tag,
|
||||
err = dmu_buf_hold_array_by_dnode(dn, offset, length, rd, tag,
|
||||
numbufsp, dbpp);
|
||||
|
||||
dnode_rele(dn, FTAG);
|
||||
|
@ -294,12 +294,12 @@ dmu_buf_hold_array(objset_t *os, uint64_t object, uint64_t offset,
|
|||
|
||||
int
|
||||
dmu_buf_hold_array_by_bonus(dmu_buf_t *db, uint64_t offset,
|
||||
uint64_t length, int read, void *tag, int *numbufsp, dmu_buf_t ***dbpp)
|
||||
uint64_t length, int rd, void *tag, int *numbufsp, dmu_buf_t ***dbpp)
|
||||
{
|
||||
dnode_t *dn = ((dmu_buf_impl_t *)db)->db_dnode;
|
||||
int err;
|
||||
|
||||
err = dmu_buf_hold_array_by_dnode(dn, offset, length, read, tag,
|
||||
err = dmu_buf_hold_array_by_dnode(dn, offset, length, rd, tag,
|
||||
numbufsp, dbpp);
|
||||
|
||||
return (err);
|
||||
|
|
Loading…
Reference in New Issue