+ /* populate cached statfs data */
+ osfs = &ofd_info(env)->fti_u.osfs;
+ rc = tgt_statfs_internal(env, &m->ofd_lut, osfs, 0, NULL);
+ if (rc != 0) {
+ CERROR("%s: can't get statfs data, rc %d\n", obd->obd_name, rc);
+ GOTO(err_fini_lut, rc);
+ }
+ if (!is_power_of_2(osfs->os_bsize)) {
+ CERROR("%s: blocksize (%d) is not a power of 2\n",
+ obd->obd_name, osfs->os_bsize);
+ GOTO(err_fini_lut, rc = -EPROTO);
+ }
+ tgd->tgd_blockbits = fls(osfs->os_bsize) - 1;
+
+ if (ONE_MB_BRW_SIZE < (1U << tgd->tgd_blockbits))
+ m->ofd_brw_size = 1U << tgd->tgd_blockbits;
+ else
+ m->ofd_brw_size = ONE_MB_BRW_SIZE;
+
+ m->ofd_cksum_types_supported = cksum_types_supported_server();
+ m->ofd_precreate_batch = OFD_PRECREATE_BATCH_DEFAULT;
+ if (osfs->os_bsize * osfs->os_blocks < OFD_PRECREATE_SMALL_FS)
+ m->ofd_precreate_batch = OFD_PRECREATE_BATCH_SMALL;
+