From 104d89f773151710b61d453db81fc0dc2952e8da Mon Sep 17 00:00:00 2001 From: dzogin Date: Tue, 23 Jun 2009 01:01:29 +0000 Subject: [PATCH] Branch HEAD b=18624 i=zhenyu.xu i=dmitry.zogin Description: Unable to run several mkfs.lustre on loop devices at the same time. --- lustre/ChangeLog | 7 +++++++ lustre/utils/mkfs_lustre.c | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/lustre/ChangeLog b/lustre/ChangeLog index 8014eb8..ff2507c 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -13,6 +13,13 @@ tbd Sun Microsystems, Inc. removed cwd "./" (refer to Bugzilla 14399). * File join has been disabled in this release, refer to Bugzilla 16929. +Severity : normal +Bugzilla : 18624 +Description: Unable to run several mkfs.lustre on loop devices at the same + time. +Details : mkfs.lustre returns error 256 on the concurrent loop devices + formatting. The solution is to proper handle the error. + Severity : enhancement Bugzilla : 19024 Description: Update kernel to RHEL5.3 2.6.18-128.1.6.el5. diff --git a/lustre/utils/mkfs_lustre.c b/lustre/utils/mkfs_lustre.c index 41f5b19..5e0b303 100644 --- a/lustre/utils/mkfs_lustre.c +++ b/lustre/utils/mkfs_lustre.c @@ -265,6 +265,10 @@ int loop_setup(struct mkfs_opts *mop) snprintf(cmd, cmdsz, "losetup %s %s", l_device, mop->mo_device); ret = run_command(cmd, cmdsz); + if (ret == 256) + /* someone else picked up this loop device + * behind our back */ + continue; if (ret) { fprintf(stderr, "%s: error %d on losetup: %s\n", progname, ret, strerror(ret)); -- 1.8.3.1