X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fmdd%2Fmdd_device.c;fp=lustre%2Fmdd%2Fmdd_device.c;h=a1b113ca5a2bb60781b7f3d85d6c1ee21fc1021d;hp=e915a94a88844a15dd36320a32a27593b34be012;hb=736d2d62ab1f00926000f0c3aa31fcb6aa53050f;hpb=3108bbb0b8485484bc1ac8ba5bac4276fc11c7c3;ds=sidebyside diff --git a/lustre/mdd/mdd_device.c b/lustre/mdd/mdd_device.c index e915a94..a1b113c 100644 --- a/lustre/mdd/mdd_device.c +++ b/lustre/mdd/mdd_device.c @@ -1317,11 +1317,30 @@ out_los: return rc; } +/** + * Implementation of lu_device_operations::ldo_fid_alloc() for MDD. + * + * Find corresponding device by passed parent and name, and allocate FID from + * there. + * + * see include/lu_object.h for the details. + */ +static int mdd_fid_alloc(const struct lu_env *env, struct lu_device *d, + struct lu_fid *fid, struct lu_object *parent, + const struct lu_name *name) +{ + struct mdd_device *mdd = lu2mdd_dev(d); + struct lu_object *o = lu_object_next(parent); + + return dt_fid_alloc(env, mdd->mdd_child, fid, o, name); +} + const struct lu_device_operations mdd_lu_ops = { .ldo_object_alloc = mdd_object_alloc, .ldo_process_config = mdd_process_config, .ldo_recovery_complete = mdd_recovery_complete, .ldo_prepare = mdd_prepare, + .ldo_fid_alloc = mdd_fid_alloc, }; static int mdd_root_get(const struct lu_env *env,