X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fmdd%2Fmdd_object.c;h=364474c63d30ec5bc91afd5d9b55357e134c5956;hp=e4357ecfc8133073051e404bd0b9775f2f8bd59b;hb=e2ac6e1eaa108eef3493837e9bd881629582ea1d;hpb=d3090bb2b4860e997730e90426e11fc51ee27c0c diff --git a/lustre/mdd/mdd_object.c b/lustre/mdd/mdd_object.c index e4357ec..364474c 100644 --- a/lustre/mdd/mdd_object.c +++ b/lustre/mdd/mdd_object.c @@ -2970,6 +2970,7 @@ void mdd_object_make_hint(const struct lu_env *env, struct mdd_object *parent, struct dt_allocation_hint *hint) { struct dt_object *np = parent ? mdd_object_child(parent) : NULL; + struct mdd_device *mdd = mdd_obj2mdd_dev(child); struct dt_object *nc = mdd_object_child(child); memset(hint, 0, sizeof(*hint)); @@ -2983,6 +2984,19 @@ void mdd_object_make_hint(const struct lu_env *env, struct mdd_object *parent, } else { hint->dah_eadata = NULL; hint->dah_eadata_len = 0; + if (spec->sp_cr_flags & MDS_OPEN_APPEND) { + if (mdd->mdd_append_stripe_count != 0 || + mdd->mdd_append_pool[0]) + CDEBUG(D_INFO, + "using O_APPEND file striping\n"); + if (mdd->mdd_append_stripe_count) + hint->dah_append_stripes = + mdd->mdd_append_stripe_count; + if (mdd->mdd_append_pool[0]) + hint->dah_append_pool = mdd->mdd_append_pool; + } else { + hint->dah_append_stripes = 0; + } } CDEBUG(D_INFO, DFID" eadata %p len %d\n", PFID(mdd_object_fid(child)),