[LU-960] Bad stripe count reported by lfs getstripe when default stripe count set to -1 Created: 04/Jan/12 Updated: 27/Mar/12 Resolved: 27/Mar/12 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.2.0 |
| Fix Version/s: | Lustre 2.2.0, Lustre 2.1.2 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Johann Lombardi (Inactive) | Assignee: | Minh Diep |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Severity: | 3 |
| Rank (Obsolete): | 4762 |
| Description |
|
When using a default stripe count of -1, the stripe count reported for newly created directory is bogus. Here is how to reproduce: [root@client-4 tests]# export STRIPES_PER_OBJ=-1
[root@client-4 tests]# sh ./llmount.sh
[...]
[root@client-4 tests]# lfs getstripe -d /mnt/lustre
stripe_count: -1 stripe_size: 1048576 stripe_offset: -1
[root@client-4 tests]# mkdir /mnt/lustre/foo
[root@client-4 tests]# lfs getstripe -d /mnt/lustre/foo
stripe_count: 4294967295 stripe_size: 1048576 stripe_offset: -1
^^^^^^^^^^
|
| Comments |
| Comment by Johann Lombardi (Inactive) [ 04/Jan/12 ] |
|
In fact the problem lies in lov_dump_user_lmm_header(): static void lov_dump_user_lmm_header(...) [...] if (verbose & VERBOSE_COUNT) { if (verbose & ~VERBOSE_COUNT) llapi_printf(LLAPI_MSG_NORMAL, "%sstripe_count: ", prefix); if (is_dir) { if (!raw && lum->lmm_stripe_count == 0) { unsigned int scount; rc = sattr_cache_get_defaults(NULL, path, &scount, NULL, NULL); if (rc == 0) llapi_printf(LLAPI_MSG_NORMAL, "%u%c", !!!!!! ^^ This must be %d here scount, nl); else llapi_error(LLAPI_MSG_ERROR, rc, "Cannot determine default" " stripe count."); } else { llapi_printf(LLAPI_MSG_NORMAL, "%d%c", lum->lmm_stripe_count == (typeof(lum->lmm_stripe_count))(-1) ? -1 : lum->lmm_stripe_count, nl); } } else { llapi_printf(LLAPI_MSG_NORMAL, "%hd%c", (__s16)lum->lmm_stripe_count, nl); } |
| Comment by Peter Jones [ 04/Jan/12 ] |
|
Minh YangSheng is busy atm so could you please look into this one? Thanks Peter |
| Comment by Minh Diep [ 05/Jan/12 ] |
|
indeed, that fixed the problem. [root@client-6 tests]# export STRIPES_PER_OBJ=-1 [root@client-6 utils]# ./lfs getstripe -d /mnt/lustre I'll post a patch soon |
| Comment by Minh Diep [ 05/Jan/12 ] |
|
patch http://review.whamcloud.com/#change,1922 I also fixed the case where lfs setstripe -s -1 [root@client-6 utils]# lfs setstripe -s -1 /mnt/lustre/foo after fix [root@client-6 utils]# ./lfs setstripe -s -1 /mnt/lustre/foo |
| Comment by Build Master (Inactive) [ 19/Jan/12 ] |
|
Integrated in Result = SUCCESS
|
| Comment by Build Master (Inactive) [ 19/Jan/12 ] |
|
Integrated in Result = SUCCESS
|
| Comment by Build Master (Inactive) [ 19/Jan/12 ] |
|
Integrated in Result = SUCCESS
|
| Comment by Build Master (Inactive) [ 19/Jan/12 ] |
|
Integrated in Result = SUCCESS
|
| Comment by Build Master (Inactive) [ 19/Jan/12 ] |
|
Integrated in Result = SUCCESS
|
| Comment by Build Master (Inactive) [ 19/Jan/12 ] |
|
Integrated in Result = SUCCESS
|
| Comment by Build Master (Inactive) [ 19/Jan/12 ] |
|
Integrated in Result = SUCCESS
|
| Comment by Build Master (Inactive) [ 19/Jan/12 ] |
|
Integrated in Result = SUCCESS
|
| Comment by Build Master (Inactive) [ 19/Jan/12 ] |
|
Integrated in Result = SUCCESS
|
| Comment by Build Master (Inactive) [ 19/Jan/12 ] |
|
Integrated in Result = SUCCESS
|
| Comment by Build Master (Inactive) [ 19/Jan/12 ] |
|
Integrated in Result = SUCCESS
|
| Comment by Build Master (Inactive) [ 19/Jan/12 ] |
|
Integrated in Result = SUCCESS
|
| Comment by Build Master (Inactive) [ 19/Jan/12 ] |
|
Integrated in Result = SUCCESS
|
| Comment by Build Master (Inactive) [ 19/Jan/12 ] |
|
Integrated in Result = SUCCESS
|
| Comment by Minh Diep [ 07/Feb/12 ] |
|
patch for b2_1 http://review.whamcloud.com/#change,2112 |