Description of problem: While running gfs_fsck_stress on ppc, I started hitting this error. I checked the source for gfs_fsck and found that it's using getopts wrong. gfs_fsck/main.c: int read_cmdline(int argc, char **argv, struct options *opts) { char c; while((c = getopt(argc, argv, "hnqvyV")) != -1) { prototype from man page: int getopt(int argc, char * const argv[], const char *optstring); Version-Release number of selected component (if applicable): GFS-6.1.13-0 How reproducible: 100% Steps to Reproduce: 1. gfs_fsck /dev/foo Actual results: See above Expected results: gfs_fsck should be able to parse command line arguments. Additional info:
Created attachment 151587 [details] patch to fix the problem The problem is that gfs_fsck's main.c was coded by AJ Lewis to set a char value from getopt(). That's fine for little endian architectures, but on PPC, which is big endian, it gets it wrong. I need to make this fix to at least 7 branches of CVS: 1. RHEL4 2. RHEL45 3. RHEL5 4. HEAD 5. STABLE 6. HEAD-GFS2 7. RHEL5-GFS2
The fix was tested on system roth-01 to make sure nothing broke. I don't have a big-endian box to test it on, so I'll let the QE group do that.
Fix committed to CVS at RHEL4, RHEL45 and STABLE branches. Setting status to modified. Bugzilla records were opened up for crosswrites: RHEL5, HEAD: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=235060 GFS2 RHEL5, HEAD: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=235061
Looks like this wasn't added to the errata, but it was released and does work.