1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=8:tabstop=8:
5 * Lustre Metadata Server (MDS) filesystem interface code
7 * Copyright (C) 2002, 2003 Cluster File Systems, Inc.
8 * Author: Andreas Dilger <adilger@clusterfs.com>
10 * This file is part of Lustre, http://www.lustre.org.
12 * Lustre is free software; you can redistribute it and/or
13 * modify it under the terms of version 2 of the GNU General Public
14 * License as published by the Free Software Foundation.
16 * Lustre is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with Lustre; if not, write to the Free Software
23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 # define EXPORT_SYMTAB
29 #define DEBUG_SUBSYSTEM S_MDS
31 #include <linux/module.h>
32 #include <linux/kmod.h>
33 #include <linux/version.h>
34 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
35 #include <linux/mount.h>
37 #include <linux/lustre_mds.h>
38 #include <linux/obd_class.h>
39 #include <linux/obd_support.h>
40 #include <linux/lustre_lib.h>
41 #include <linux/lustre_fsfilt.h>
42 #include <portals/list.h>
44 #include "mds_internal.h"
46 /* This limit is arbitrary, but for now we fit it in 1 page (32k clients) */
47 #define MDS_MAX_CLIENTS (PAGE_SIZE * 8)
48 #define MDS_MAX_CLIENT_WORDS (MDS_MAX_CLIENTS / sizeof(unsigned long))
50 #define LAST_RCVD "last_rcvd"
51 #define LOV_OBJID "lov_objid"
53 /* Add client data to the MDS. We use a bitmap to locate a free space
54 * in the last_rcvd file if cl_off is -1 (i.e. a new client).
55 * Otherwise, we have just read the data from the last_rcvd file and
58 int mds_client_add(struct obd_device *obd, struct mds_obd *mds,
59 struct mds_export_data *med, int cl_idx)
61 unsigned long *bitmap = mds->mds_client_bitmap;
62 int new_client = (cl_idx == -1);
65 LASSERT(bitmap != NULL);
67 /* XXX if mcd_uuid were a real obd_uuid, I could use obd_uuid_equals */
68 if (!strcmp(med->med_mcd->mcd_uuid, obd->obd_uuid.uuid))
71 /* the bitmap operations can handle cl_idx > sizeof(long) * 8, so
72 * there's no need for extra complication here
75 cl_idx = find_first_zero_bit(bitmap, MDS_MAX_CLIENTS);
77 if (cl_idx >= MDS_MAX_CLIENTS) {
78 CERROR("no room for clients - fix MDS_MAX_CLIENTS\n");
81 if (test_and_set_bit(cl_idx, bitmap)) {
82 cl_idx = find_next_zero_bit(bitmap, MDS_MAX_CLIENTS,
87 if (test_and_set_bit(cl_idx, bitmap)) {
88 CERROR("MDS client %d: bit already set in bitmap!!\n",
94 CDEBUG(D_INFO, "client at index %d with UUID '%s' added\n",
95 cl_idx, med->med_mcd->mcd_uuid);
97 med->med_idx = cl_idx;
98 med->med_off = MDS_LR_CLIENT_START + (cl_idx * MDS_LR_CLIENT_SIZE);
101 struct obd_run_ctxt saved;
102 loff_t off = med->med_off;
103 struct file *file = mds->mds_rcvd_filp;
106 push_ctxt(&saved, &obd->obd_ctxt, NULL);
107 rc = fsfilt_write_record(obd, file, med->med_mcd,
108 sizeof(*med->med_mcd), &off, 1);
109 pop_ctxt(&saved, &obd->obd_ctxt, NULL);
113 CDEBUG(D_INFO, "wrote client mcd at idx %u off %llu (len %u)\n",
114 med->med_idx, med->med_off,
115 (unsigned int)sizeof(*med->med_mcd));
120 int mds_client_free(struct obd_export *exp, int clear_client)
122 struct mds_export_data *med = &exp->exp_mds_data;
123 struct mds_obd *mds = &exp->exp_obd->u.mds;
124 struct obd_device *obd = exp->exp_obd;
125 struct mds_client_data zero_mcd;
126 struct obd_run_ctxt saved;
128 unsigned long *bitmap = mds->mds_client_bitmap;
134 /* XXX if mcd_uuid were a real obd_uuid, I could use obd_uuid_equals */
135 if (!strcmp(med->med_mcd->mcd_uuid, obd->obd_uuid.uuid))
136 GOTO(free_and_out, 0);
138 CDEBUG(D_INFO, "freeing client at index %u (%lld)with UUID '%s'\n",
139 med->med_idx, med->med_off, med->med_mcd->mcd_uuid);
141 if (!test_and_clear_bit(med->med_idx, bitmap)) {
142 CERROR("MDS client %u: bit already clear in bitmap!!\n",
148 memset(&zero_mcd, 0, sizeof zero_mcd);
149 push_ctxt(&saved, &obd->obd_ctxt, NULL);
150 rc = fsfilt_write_record(obd, mds->mds_rcvd_filp, &zero_mcd,
151 sizeof(zero_mcd), &med->med_off, 1);
152 pop_ctxt(&saved, &obd->obd_ctxt, NULL);
154 CDEBUG(rc == 0 ? D_INFO : D_ERROR,
155 "zeroing out client %s off %u in %s rc %d\n",
156 med->med_mcd->mcd_uuid, med->med_idx, LAST_RCVD, rc);
160 OBD_FREE(med->med_mcd, sizeof(*med->med_mcd));
165 static int mds_server_free_data(struct mds_obd *mds)
167 OBD_FREE(mds->mds_client_bitmap,
168 MDS_MAX_CLIENT_WORDS * sizeof(unsigned long));
169 OBD_FREE(mds->mds_server_data, sizeof(*mds->mds_server_data));
170 mds->mds_server_data = NULL;
175 static int mds_read_last_rcvd(struct obd_device *obd, struct file *file)
177 struct mds_obd *mds = &obd->u.mds;
178 struct mds_server_data *msd;
179 struct mds_client_data *mcd = NULL;
181 unsigned long last_rcvd_size = file->f_dentry->d_inode->i_size;
182 __u64 last_transno = 0;
187 LASSERT(sizeof(struct mds_client_data) == MDS_LR_CLIENT_SIZE);
188 LASSERT(sizeof(struct mds_server_data) <= MDS_LR_SERVER_SIZE);
190 OBD_ALLOC_WAIT(msd, sizeof(*msd));
194 OBD_ALLOC_WAIT(mds->mds_client_bitmap,
195 MDS_MAX_CLIENT_WORDS * sizeof(unsigned long));
196 if (!mds->mds_client_bitmap) {
197 OBD_FREE(msd, sizeof(*msd));
201 mds->mds_server_data = msd;
203 if (last_rcvd_size == 0) {
204 CWARN("%s: initializing new %s\n", obd->obd_name, LAST_RCVD);
205 memcpy(msd->msd_uuid, obd->obd_uuid.uuid,sizeof(msd->msd_uuid));
206 msd->msd_server_size = cpu_to_le32(MDS_LR_SERVER_SIZE);
207 msd->msd_client_start = cpu_to_le32(MDS_LR_CLIENT_START);
208 msd->msd_client_size = cpu_to_le16(MDS_LR_CLIENT_SIZE);
209 msd->msd_feature_rocompat = cpu_to_le32(MDS_ROCOMPAT_LOVOBJID);
210 rc = fsfilt_write_record(obd, file, msd, sizeof(*msd), &off, 1);
215 CERROR("%s: error writing new MSD: %d\n", obd->obd_name, rc);
219 rc = fsfilt_read_record(obd, file, msd, sizeof(*msd), &off);
221 CERROR("error reading MDS %s: rc = %d\n", LAST_RCVD, rc);
224 if (!msd->msd_server_size)
225 msd->msd_server_size = cpu_to_le32(MDS_LR_SERVER_SIZE);
226 if (!msd->msd_client_start)
227 msd->msd_client_start = cpu_to_le32(MDS_LR_CLIENT_START);
228 if (!msd->msd_client_size)
229 msd->msd_client_size = cpu_to_le16(MDS_LR_CLIENT_SIZE);
231 if (msd->msd_feature_incompat & ~cpu_to_le32(MDS_INCOMPAT_SUPP)) {
232 CERROR("unsupported incompat feature %x\n",
233 le32_to_cpu(msd->msd_feature_incompat) &
235 GOTO(err_msd, rc = -EINVAL);
237 /* XXX updating existing b_devel fs only, can be removed in future */
238 msd->msd_feature_rocompat = cpu_to_le32(MDS_ROCOMPAT_LOVOBJID);
239 if (msd->msd_feature_rocompat & ~cpu_to_le32(MDS_ROCOMPAT_SUPP)) {
240 CERROR("unsupported read-only feature %x\n",
241 le32_to_cpu(msd->msd_feature_rocompat) &
243 /* Do something like remount filesystem read-only */
244 GOTO(err_msd, rc = -EINVAL);
247 last_transno = le64_to_cpu(msd->msd_last_transno);
248 mds->mds_last_transno = last_transno;
250 mount_count = le64_to_cpu(msd->msd_mount_count);
251 mds->mds_mount_count = mount_count;
253 CDEBUG(D_INODE, "%s: server last_transno: "LPU64"\n",
254 obd->obd_name, last_transno);
255 CDEBUG(D_INODE, "%s: server mount_count: "LPU64"\n",
256 obd->obd_name, mount_count);
257 CDEBUG(D_INODE, "%s: server data size: %u\n",
258 obd->obd_name, le32_to_cpu(msd->msd_server_size));
259 CDEBUG(D_INODE, "%s: per-client data start: %u\n",
260 obd->obd_name, le32_to_cpu(msd->msd_client_start));
261 CDEBUG(D_INODE, "%s: per-client data size: %u\n",
262 obd->obd_name, le32_to_cpu(msd->msd_client_size));
263 CDEBUG(D_INODE, "%s: last_rcvd size: %lu\n",
264 obd->obd_name, last_rcvd_size);
265 CDEBUG(D_INODE, "%s: last_rcvd clients: %lu\n", obd->obd_name,
266 last_rcvd_size <= MDS_LR_CLIENT_START ? 0 :
267 (last_rcvd_size - MDS_LR_CLIENT_START) / MDS_LR_CLIENT_SIZE);
269 /* When we do a clean MDS shutdown, we save the last_transno into
270 * the header. If we find clients with higher last_transno values
271 * then those clients may need recovery done. */
272 for (cl_idx = 0, off = le32_to_cpu(msd->msd_client_start);
273 off < last_rcvd_size; cl_idx++) {
278 OBD_ALLOC_WAIT(mcd, sizeof(*mcd));
280 GOTO(err_client, rc = -ENOMEM);
283 /* Don't assume off is incremented properly by
284 * fsfilt_read_record(), in case sizeof(*mcd)
285 * isn't the same as msd->msd_client_size. */
286 off = le32_to_cpu(msd->msd_client_start) +
287 cl_idx * le16_to_cpu(msd->msd_client_size);
288 rc = fsfilt_read_record(obd, file, mcd, sizeof(*mcd), &off);
290 CERROR("error reading MDS %s idx %d, off %llu: rc %d\n",
291 LAST_RCVD, cl_idx, off, rc);
292 break; /* read error shouldn't cause startup to fail */
295 if (mcd->mcd_uuid[0] == '\0') {
296 CDEBUG(D_INFO, "skipping zeroed client at offset %d\n",
301 last_transno = le64_to_cpu(mcd->mcd_last_transno);
303 /* These exports are cleaned up by mds_disconnect(), so they
304 * need to be set up like real exports as mds_connect() does.
306 mount_age = mount_count - le64_to_cpu(mcd->mcd_mount_count);
307 if (mount_age < MDS_MOUNT_RECOV) {
308 struct obd_export *exp = class_new_export(obd);
309 struct mds_export_data *med;
310 CDEBUG(D_HA, "RCVRNG CLIENT uuid: %s idx: %d lr: "LPU64
311 " srv lr: "LPU64" mnt: "LPU64" last mount: "
312 LPU64"\n", mcd->mcd_uuid, cl_idx,
313 last_transno, le64_to_cpu(msd->msd_last_transno),
314 le64_to_cpu(mcd->mcd_mount_count), mount_count);
316 GOTO(err_client, rc = -ENOMEM);
318 memcpy(&exp->exp_client_uuid.uuid, mcd->mcd_uuid,
319 sizeof exp->exp_client_uuid.uuid);
320 med = &exp->exp_mds_data;
322 mds_client_add(obd, mds, med, cl_idx);
323 /* create helper if export init gets more complex */
324 INIT_LIST_HEAD(&med->med_open_head);
325 spin_lock_init(&med->med_open_lock);
328 obd->obd_recoverable_clients++;
329 obd->obd_max_recoverable_clients++;
330 class_export_put(exp);
332 CDEBUG(D_INFO, "discarded client %d, UUID '%s', count "
333 LPU64"\n", cl_idx, mcd->mcd_uuid,
334 le64_to_cpu(mcd->mcd_mount_count));
337 CDEBUG(D_OTHER, "client at idx %d has last_transno = "LPU64"\n",
338 cl_idx, last_transno);
340 if (last_transno > mds->mds_last_transno)
341 mds->mds_last_transno = last_transno;
344 obd->obd_last_committed = mds->mds_last_transno;
345 if (obd->obd_recoverable_clients) {
346 CWARN("RECOVERY: %d recoverable clients, last_transno "
347 LPU64"\n", obd->obd_recoverable_clients,
348 mds->mds_last_transno);
349 obd->obd_next_recovery_transno = obd->obd_last_committed + 1;
350 obd->obd_recovering = 1;
354 OBD_FREE(mcd, sizeof(*mcd));
359 class_disconnect_exports(obd, 0);
361 mds_server_free_data(mds);
365 int mds_fs_setup(struct obd_device *obd, struct vfsmount *mnt)
367 struct mds_obd *mds = &obd->u.mds;
368 struct obd_run_ctxt saved;
369 struct dentry *dentry;
375 /* Get rid of unneeded supplementary groups */
376 current->ngroups = 0;
377 memset(current->groups, 0, sizeof(current->groups));
379 mds->mds_vfsmnt = mnt;
380 mds->mds_sb = mnt->mnt_root->d_inode->i_sb;
382 fsfilt_setup(obd, mds->mds_sb);
384 OBD_SET_CTXT_MAGIC(&obd->obd_ctxt);
385 obd->obd_ctxt.pwdmnt = mnt;
386 obd->obd_ctxt.pwd = mnt->mnt_root;
387 obd->obd_ctxt.fs = get_ds();
388 obd->obd_ctxt.cb_ops = mds_lvfs_ops;
390 /* setup the directory tree */
391 push_ctxt(&saved, &obd->obd_ctxt, NULL);
392 dentry = simple_mkdir(current->fs->pwd, "ROOT", 0755);
393 if (IS_ERR(dentry)) {
394 rc = PTR_ERR(dentry);
395 CERROR("cannot create ROOT directory: rc = %d\n", rc);
399 mds->mds_rootfid.id = dentry->d_inode->i_ino;
400 mds->mds_rootfid.generation = dentry->d_inode->i_generation;
401 mds->mds_rootfid.f_type = S_IFDIR;
405 dentry = lookup_one_len("__iopen__", current->fs->pwd,
406 strlen("__iopen__"));
407 if (IS_ERR(dentry) || !dentry->d_inode) {
408 rc = (IS_ERR(dentry)) ? PTR_ERR(dentry): -ENOENT;
409 CERROR("cannot open iopen FH directory: rc = %d\n", rc);
412 mds->mds_fid_de = dentry;
414 dentry = simple_mkdir(current->fs->pwd, "PENDING", 0777);
415 if (IS_ERR(dentry)) {
416 rc = PTR_ERR(dentry);
417 CERROR("cannot create PENDING directory: rc = %d\n", rc);
420 mds->mds_pending_dir = dentry;
422 dentry = simple_mkdir(current->fs->pwd, "LOGS", 0777);
423 if (IS_ERR(dentry)) {
424 rc = PTR_ERR(dentry);
425 CERROR("cannot create LOGS directory: rc = %d\n", rc);
426 GOTO(err_pending, rc);
428 mds->mds_logs_dir = dentry;
430 dentry = simple_mkdir(current->fs->pwd, "OBJECTS", 0777);
431 if (IS_ERR(dentry)) {
432 rc = PTR_ERR(dentry);
433 CERROR("cannot create OBJECTS directory: rc = %d\n", rc);
436 mds->mds_objects_dir = dentry;
438 /* open and test the last rcvd file */
439 file = filp_open(LAST_RCVD, O_RDWR | O_CREAT, 0644);
442 CERROR("cannot open/create %s file: rc = %d\n", LAST_RCVD, rc);
443 GOTO(err_objects, rc = PTR_ERR(file));
445 mds->mds_rcvd_filp = file;
446 if (!S_ISREG(file->f_dentry->d_inode->i_mode)) {
447 CERROR("%s is not a regular file!: mode = %o\n", LAST_RCVD,
448 file->f_dentry->d_inode->i_mode);
449 GOTO(err_last_rcvd, rc = -ENOENT);
452 rc = mds_read_last_rcvd(obd, file);
454 CERROR("cannot read %s: rc = %d\n", LAST_RCVD, rc);
455 GOTO(err_last_rcvd, rc);
458 /* open and test the lov objd file */
459 file = filp_open(LOV_OBJID, O_RDWR | O_CREAT, 0644);
462 CERROR("cannot open/create %s file: rc = %d\n", LOV_OBJID, rc);
463 GOTO(err_client, rc = PTR_ERR(file));
465 mds->mds_lov_objid_filp = file;
466 if (!S_ISREG(file->f_dentry->d_inode->i_mode)) {
467 CERROR("%s is not a regular file!: mode = %o\n", LOV_OBJID,
468 file->f_dentry->d_inode->i_mode);
469 GOTO(err_lov_objid, rc = -ENOENT);
472 pop_ctxt(&saved, &obd->obd_ctxt, NULL);
477 if (mds->mds_lov_objid_filp && filp_close(mds->mds_lov_objid_filp, 0))
478 CERROR("can't close %s after error\n", LOV_OBJID);
480 class_disconnect_exports(obd, 0);
482 if (mds->mds_rcvd_filp && filp_close(mds->mds_rcvd_filp, 0))
483 CERROR("can't close %s after error\n", LAST_RCVD);
485 dput(mds->mds_objects_dir);
487 dput(mds->mds_logs_dir);
489 dput(mds->mds_pending_dir);
491 dput(mds->mds_fid_de);
496 int mds_fs_cleanup(struct obd_device *obd, int flags)
498 struct mds_obd *mds = &obd->u.mds;
499 struct obd_run_ctxt saved;
502 if (flags & OBD_OPT_FAILOVER)
503 CERROR("%s: shutting down for failover; client state will"
504 " be preserved.\n", obd->obd_name);
506 class_disconnect_exports(obd, flags); /* cleans up client info too */
507 mds_server_free_data(mds);
509 push_ctxt(&saved, &obd->obd_ctxt, NULL);
510 if (mds->mds_rcvd_filp) {
511 rc = filp_close(mds->mds_rcvd_filp, 0);
512 mds->mds_rcvd_filp = NULL;
514 CERROR("%s file won't close, rc=%d\n", LAST_RCVD, rc);
516 if (mds->mds_lov_objid_filp) {
517 rc = filp_close(mds->mds_lov_objid_filp, 0);
518 mds->mds_lov_objid_filp = NULL;
520 CERROR("%s file won't close, rc=%d\n", LOV_OBJID, rc);
522 if (mds->mds_objects_dir != NULL) {
523 l_dput(mds->mds_objects_dir);
524 mds->mds_objects_dir = NULL;
526 if (mds->mds_logs_dir) {
527 l_dput(mds->mds_logs_dir);
528 mds->mds_logs_dir = NULL;
530 if (mds->mds_pending_dir) {
531 l_dput(mds->mds_pending_dir);
532 mds->mds_pending_dir = NULL;
534 pop_ctxt(&saved, &obd->obd_ctxt, NULL);
535 shrink_dcache_parent(mds->mds_fid_de);
536 dput(mds->mds_fid_de);
541 /* Creates an object with the same name as its fid. Because this is not at all
542 * performance sensitive, it is accomplished by creating a file, checking the
543 * fid, and renaming it. */
544 int mds_obd_create(struct obd_export *exp, struct obdo *oa,
545 struct lov_stripe_md **ea, struct obd_trans_info *oti)
547 struct mds_obd *mds = &exp->exp_obd->u.mds;
548 struct inode *parent_inode = mds->mds_objects_dir->d_inode;
549 unsigned int tmpname = ll_insecure_random_int();
551 struct dentry *new_child;
552 struct obd_run_ctxt saved;
553 char fidname[LL_FID_NAMELEN];
555 int rc = 0, err, namelen;
558 push_ctxt(&saved, &exp->exp_obd->obd_ctxt, NULL);
560 sprintf(fidname, "OBJECTS/%u", tmpname);
561 filp = filp_open(fidname, O_CREAT | O_EXCL, 0644);
565 CERROR("impossible object name collision %u\n",
569 CERROR("error creating tmp object %u: rc %d\n", tmpname, rc);
573 LASSERT(mds->mds_objects_dir == filp->f_dentry->d_parent);
575 oa->o_id = filp->f_dentry->d_inode->i_ino;
576 oa->o_generation = filp->f_dentry->d_inode->i_generation;
577 namelen = ll_fid2str(fidname, oa->o_id, oa->o_generation);
579 down(&parent_inode->i_sem);
580 new_child = lookup_one_len(fidname, mds->mds_objects_dir, namelen);
582 if (IS_ERR(new_child)) {
583 CERROR("getting neg dentry for obj rename: %d\n", rc);
584 GOTO(out_close, rc = PTR_ERR(new_child));
586 if (new_child->d_inode != NULL) {
587 CERROR("impossible non-negative obj dentry " LPU64":%u!\n",
588 oa->o_id, oa->o_generation);
592 handle = fsfilt_start(exp->exp_obd, mds->mds_objects_dir->d_inode,
593 FSFILT_OP_RENAME, NULL);
595 GOTO(out_dput, rc = PTR_ERR(handle));
598 rc = vfs_rename(mds->mds_objects_dir->d_inode, filp->f_dentry,
599 mds->mds_objects_dir->d_inode, new_child);
602 CERROR("error renaming new object "LPU64":%u: rc %d\n",
603 oa->o_id, oa->o_generation, rc);
605 err = fsfilt_commit(exp->exp_obd, mds->mds_objects_dir->d_inode,
608 oa->o_valid |= OBD_MD_FLID | OBD_MD_FLGENER;
614 up(&parent_inode->i_sem);
615 err = filp_close(filp, 0);
617 CERROR("closing tmpfile %u: rc %d\n", tmpname, rc);
622 pop_ctxt(&saved, &exp->exp_obd->obd_ctxt, NULL);
626 int mds_obd_destroy(struct obd_export *exp, struct obdo *oa,
627 struct lov_stripe_md *ea, struct obd_trans_info *oti)
629 struct mds_obd *mds = &exp->exp_obd->u.mds;
630 struct inode *parent_inode = mds->mds_objects_dir->d_inode;
631 struct obd_device *obd = exp->exp_obd;
632 struct obd_run_ctxt saved;
633 char fidname[LL_FID_NAMELEN];
636 int err, namelen, rc = 0;
639 push_ctxt(&saved, &obd->obd_ctxt, NULL);
641 namelen = ll_fid2str(fidname, oa->o_id, oa->o_generation);
643 down(&parent_inode->i_sem);
644 de = lookup_one_len(fidname, mds->mds_objects_dir, namelen);
645 if (de == NULL || de->d_inode == NULL) {
646 CERROR("destroying non-existent object "LPU64"\n", oa->o_id);
647 GOTO(out, rc = IS_ERR(de) ? PTR_ERR(de) : -ENOENT);
650 handle = fsfilt_start(obd, mds->mds_objects_dir->d_inode,
651 FSFILT_OP_UNLINK_LOG, oti);
652 if (IS_ERR(handle)) {
653 GOTO(out_dput, rc = PTR_ERR(handle));
656 rc = vfs_unlink(mds->mds_objects_dir->d_inode, de);
658 CERROR("error destroying object "LPU64":%u: rc %d\n",
659 oa->o_id, oa->o_generation, rc);
661 err = fsfilt_commit(obd, mds->mds_objects_dir->d_inode, handle, 0);
667 up(&parent_inode->i_sem);
668 pop_ctxt(&saved, &obd->obd_ctxt, NULL);