Whamcloud - gitweb
LU-5149 utils: Create debug upcall to dump ldlm namespaces
[fs/lustre-release.git] / lustre / osd-zfs / osd_io.c
index d85c25b..9b650f5 100644 (file)
@@ -49,7 +49,7 @@
 #include <obd_class.h>
 #include <lustre_disk.h>
 #include <lustre_fid.h>
-#include <lustre/lustre_idl.h> /* LLOG_CHUNK_SIZE definition */
+#include <lustre/lustre_idl.h> /* LLOG_MIN_CHUNK_SIZE definition */
 
 #include "osd_internal.h"
 
@@ -183,9 +183,9 @@ static ssize_t osd_declare_write(const struct lu_env *env, struct dt_object *dt,
 
        /* XXX: we still miss for append declaration support in ZFS
         *      -1 means append which is used by llog mostly, llog
-        *      can grow upto LLOG_CHUNK_SIZE*8 records */
+        *      can grow upto LLOG_MIN_CHUNK_SIZE*8 records */
        if (pos == -1)
-               pos = max_t(loff_t, 256 * 8 * LLOG_CHUNK_SIZE,
+               pos = max_t(loff_t, 256 * 8 * LLOG_MIN_CHUNK_SIZE,
                            obj->oo_attr.la_size + (2 << 20));
        dmu_tx_hold_write(oh->ot_tx, oid, pos, buf->lb_len);
 
@@ -559,7 +559,8 @@ static int osd_count_not_mapped(struct osd_object *obj, uint64_t start,
                if (start < dn->dn_datablksz)
                        start = dn->dn_datablksz;
                /* assume largest block size */
-               blkshift = SPA_MAXBLOCKSHIFT;
+               blkshift = osd_spa_maxblockshift(
+                       dmu_objset_spa(osd_obj2dev(obj)->od_os));
        } else {
                /* blocksize can't change */
                blkshift = dn->dn_datablkshift;