summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
3680fa1)
osd-zfs should not set blocksize on non-OST objects.
Change-Id: Idafe2236a49ffcb86bf06971d3687c8fceb516a2
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-on: http://review.whamcloud.com/19286
Tested-by: Jenkins
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
struct lu_attr *la, uint64_t parent,
struct osd_thandle *oh)
{
struct lu_attr *la, uint64_t parent,
struct osd_thandle *oh)
{
- dmu_buf_t *db;
- int rc;
+ const struct lu_fid *fid = lu_object_fid(&obj->oo_dt.do_lu);
+ dmu_buf_t *db;
+ int rc;
struct osd_device *osd = osd_obj2dev(obj);
LASSERT(S_ISREG(la->la_mode));
struct osd_device *osd = osd_obj2dev(obj);
LASSERT(S_ISREG(la->la_mode));
* blocksize is selected based on the file size rather than the
* making broad assumptions based on the osd type.
*/
* blocksize is selected based on the file size rather than the
* making broad assumptions based on the osd type.
*/
- if (!lu_device_is_md(osd2lu_dev(osd))) {
+ if ((fid_is_idif(fid) || fid_is_norm(fid)) && osd->od_is_ost) {
rc = -dmu_object_set_blocksize(osd->od_os, db->db_object,
osd->od_max_blksz, 0, oh->ot_tx);
if (unlikely(rc)) {
rc = -dmu_object_set_blocksize(osd->od_os, db->db_object,
osd->od_max_blksz, 0, oh->ot_tx);
if (unlikely(rc)) {