From: adilger Date: Thu, 26 Dec 2002 10:29:26 +0000 (+0000) Subject: Damn CVS ate my nice long comment... X-Git-Tag: v1_7_100~1^368~136 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=0416f46620e0e364efe73107f2f730fbff61d090;p=fs%2Flustre-release.git Damn CVS ate my nice long comment... Changes related to "fast" LOV stripe MD storage on the MDS: - Store small MD data inside the inode to avoid an extra seek. We don't need the super-hack of overloading the inode delete method like we did before, because we don't store the file size on the MDS any more, which means we don't truncate the fake blocks from the file on unlink. - Don't send size updates to MDS to avoid needless RPC and also avoid messing with MD data in inode per above. - Reduce MDS MD size by removing redundant fields and reducing the size of others, so that it is more likely we can fit this data into the inode. We can use the lmm_magic field to determine different stripe types, which will probably need different data fields anyways. This changes the ioctl interface, so I probably should create a lov_user_md struct again, now that lov_setstripe() iocontrol exists. - Pack MDS MD data only up to the last-allocated OST index, to make it smaller. - Change lov_create() OST selection code (per bug 470). This wasn't strictly related to this change, but it was in my tree and overlapping and I didn't want to re-do the changes. It seems to work, and it will help us handle errors that happen just at the wrong time (and also OSTs with no space/objs). - Check MD input data more carefully. --- diff --git a/lustre/utils/lfind.c b/lustre/utils/lfind.c index 26ee9eb..93777d6 100644 --- a/lustre/utils/lfind.c +++ b/lustre/utils/lfind.c @@ -199,7 +199,7 @@ processFile(const char *path, const struct stat *sp, int flag, struct FTW *ftwp) return(1); } - if ((fd = open(path, O_RDONLY)) < 0) { + if ((fd = open(path, O_RDONLY | O_LOV_DELAY_CREATE)) < 0) { errMsg("open \"%.20s\" failed.", path); perror("open"); exit(1); @@ -212,7 +212,7 @@ processFile(const char *path, const struct stat *sp, int flag, struct FTW *ftwp) if ((rc = ioctl(fd, LL_IOC_LOV_GETSTRIPE, (void *)lmm)) < 0) { errMsg("LL_IOC_LOV_GETSTRIPE ioctl failed."); perror("ioctl"); - exit(1); + return 0; } close(fd); @@ -225,11 +225,11 @@ processFile(const char *path, const struct stat *sp, int flag, struct FTW *ftwp) if (verbose) { printf("lmm_magic: 0x%x\n", lmm->lmm_magic); printf("lmm_object_id: "LPX64"\n", lmm->lmm_object_id); - printf("lmm_stripe_offset: %d\n", lmm->lmm_stripe_offset); - printf("lmm_stripe_count: %d\n", lmm->lmm_stripe_count); - printf("lmm_stripe_size: "LPU64"\n", lmm->lmm_stripe_size); - printf("lmm_ost_count: %d\n", lmm->lmm_ost_count); - printf("lmm_stripe_pattern: %d\n", lmm->lmm_stripe_pattern); + printf("lmm_stripe_offset: %u\n", (int)lmm->lmm_stripe_offset); + printf("lmm_stripe_count: %u\n", (int)lmm->lmm_stripe_count); + printf("lmm_stripe_size: %u\n", (int)lmm->lmm_stripe_size); + printf("lmm_ost_count: %u\n", lmm->lmm_ost_count); + printf("lmm_stripe_pattern: %d\n", lmm->lmm_magic & 0xf); } count = lmm->lmm_ost_count;