[LU-6754] wiretest / wirecheck don't match up Created: 23/Jun/15  Updated: 15/Jul/16  Resolved: 15/Jul/16

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.9.0

Type: Bug Priority: Minor
Reporter: Kit Westneat Assignee: Nathaniel Clark
Resolution: Fixed Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

It looks like there are a couple of definitions that differ between wirecheck and wiretest.

This is in wiretest, but not wirecheck:

+       LASSERTF((int)offsetof(struct llog_log_hdr, llh_reserved) == 84, "found %lld\n",
+                (long long)(int)offsetof(struct llog_log_hdr, llh_reserved));
+       LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_reserved) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_reserved));
+       LASSERTF((int)offsetof(struct llog_log_hdr, llh_bitmap) == 88, "found %lld\n",
+                (long long)(int)offsetof(struct llog_log_hdr, llh_bitmap));
+       LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_bitmap) == 8096, "found %lld\n",
+                (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_bitmap));
+       LASSERTF((int)offsetof(struct llog_log_hdr, llh_tail) == 8184, "found %lld\n",
+                (long long)(int)offsetof(struct llog_log_hdr, llh_tail));
+       LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_tail) == 8, "found %lld\n",
+                (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_tail));

The other difference is with fiemap_extent where wirecheck has fe_device, but wiretest still references fe_reserved.

-       LASSERTF((int)offsetof(struct fiemap_extent, fe_reserved[0]) == 44, "found %lld\n",
-                (long long)(int)offsetof(struct fiemap_extent, fe_reserved[0]));
-       LASSERTF((int)sizeof(((struct fiemap_extent *)0)->fe_reserved[0]) == 4, "found %lld\n",
-                (long long)(int)sizeof(((struct fiemap_extent *)0)->fe_reserved[0]));
+       LASSERTF((int)offsetof(struct fiemap_extent, fe_device) == 44, "found %lld\n",
+                (long long)(int)offsetof(struct fiemap_extent, fe_device));
+       LASSERTF((int)sizeof(((struct fiemap_extent *)0)->fe_device) == 4, "found %lld\n",
+                (long long)(int)sizeof(((struct fiemap_extent *)0)->fe_device));


 Comments   
Comment by Oleg Drokin [ 03/Jul/15 ]

We need to also think about how to automatically detect cases where one file is updated and not the other.

Comment by Andreas Dilger [ 03/Jul/15 ]

The first part of the change is from one of Di's recent patches to change the llog header size. I believe that one of his later patches removes the llog_log_hdr delta. The FIEMAP change is due to an older patch to remove the lustre_fiemap.h and use the kernel version of this header instead. Lustre is using what is currently a reserved field, but now that we are in the kernel it may be possible to reserve it properly.

Comment by Nathaniel Clark [ 15/Jul/16 ]

The issues noted here were resolved by patch: http://review.whamcloud.com/15162

Generated at Sat Feb 10 02:02:57 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.