Merge commit 'refs/top-bases/linux-have-fm' into linux-have-fm

This commit is contained in:
Brian Behlendorf 2008-12-17 17:01:36 -08:00
commit 2044c4bfd1
1 changed files with 7 additions and 7 deletions

View File

@ -181,7 +181,7 @@ dmu_bonus_hold(objset_t *os, uint64_t object, void *tag, dmu_buf_t **dbp)
*/ */
static int static int
dmu_buf_hold_array_by_dnode(dnode_t *dn, uint64_t offset, 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; dsl_pool_t *dp = NULL;
dmu_buf_t **dbp; dmu_buf_t **dbp;
@ -231,7 +231,7 @@ dmu_buf_hold_array_by_dnode(dnode_t *dn, uint64_t offset,
return (EIO); return (EIO);
} }
/* initiate async i/o */ /* initiate async i/o */
if (read) { if (rd) {
rw_exit(&dn->dn_struct_rwlock); rw_exit(&dn->dn_struct_rwlock);
(void) dbuf_read(db, zio, flags); (void) dbuf_read(db, zio, flags);
rw_enter(&dn->dn_struct_rwlock, RW_READER); 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 */ /* wait for other io to complete */
if (read) { if (rd) {
for (i = 0; i < nblks; i++) { for (i = 0; i < nblks; i++) {
dmu_buf_impl_t *db = (dmu_buf_impl_t *)dbp[i]; dmu_buf_impl_t *db = (dmu_buf_impl_t *)dbp[i];
mutex_enter(&db->db_mtx); mutex_enter(&db->db_mtx);
@ -275,7 +275,7 @@ dmu_buf_hold_array_by_dnode(dnode_t *dn, uint64_t offset,
static int static int
dmu_buf_hold_array(objset_t *os, uint64_t object, uint64_t offset, 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; dnode_t *dn;
int err; int err;
@ -284,7 +284,7 @@ dmu_buf_hold_array(objset_t *os, uint64_t object, uint64_t offset,
if (err) if (err)
return (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); numbufsp, dbpp);
dnode_rele(dn, FTAG); dnode_rele(dn, FTAG);
@ -294,12 +294,12 @@ dmu_buf_hold_array(objset_t *os, uint64_t object, uint64_t offset,
int int
dmu_buf_hold_array_by_bonus(dmu_buf_t *db, uint64_t offset, 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; dnode_t *dn = ((dmu_buf_impl_t *)db)->db_dnode;
int err; 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); numbufsp, dbpp);
return (err); return (err);