X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fosd-zfs%2Fosd_io.c;h=a253a9c16a1d454ef03b33a645411fcbfc0a58c4;hb=7a814e94e065551ab79e2ba75df9626e4940efc5;hp=6ed983b94707de03c1371b7ee73f850dc09e8c28;hpb=2104ed0f0da3651f0cb4ab0c78a1037891d7cb4f;p=fs%2Flustre-release.git diff --git a/lustre/osd-zfs/osd_io.c b/lustre/osd-zfs/osd_io.c index 6ed983b..a253a9c 100644 --- a/lustre/osd-zfs/osd_io.c +++ b/lustre/osd-zfs/osd_io.c @@ -15,11 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf - * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ @@ -168,18 +164,11 @@ static ssize_t osd_declare_write(const struct lu_env *env, struct dt_object *dt, * LOHA_EXISTs is supposed to be the last step in the * initialization */ - /* declare possible size change. notice we can't check - * current size here as another thread can change it */ - - if (dt_object_exists(dt)) { - LASSERT(obj->oo_db); + /* size change (in dnode) will be declared by dmu_tx_hold_write() */ + if (dt_object_exists(dt)) oid = obj->oo_db->db_object; - - dmu_tx_hold_sa(oh->ot_tx, obj->oo_sa_hdl, 0); - } else { + else oid = DMU_NEW_OBJECT; - dmu_tx_hold_sa_create(oh->ot_tx, ZFS_SA_BASE_ATTR_SIZE); - } /* XXX: we still miss for append declaration support in ZFS * -1 means append which is used by llog mostly, llog @@ -653,7 +642,7 @@ static int osd_declare_write_commit(const struct lu_env *env, * copies */ space *= osd->od_os->os_copies; space = toqb(space); - CDEBUG(D_QUOTA, "writing %d pages, reserving "LPD64"K of quota space\n", + CDEBUG(D_QUOTA, "writing %d pages, reserving %lldK of quota space\n", npages, space); record_start_io(osd, WRITE, discont_pages);