On 13-04-15 10:47 AM, Sabuj Pattanayek wrote:
> Does this force ext4 to return 32 bit hash values, i.e. have the same
> effect has downgrading the kernel to pre 2.6.32-268.el6 ?
Yes, it should work properly after that.

You can verify with the attached program (which I found while
researching this) - it should return low offsets:

$ ./d_off /export/bricks/5001173100000000/glusterdata/
.: 4 (4)
..: 6 (6)
.glusterfs: 9 (9)
common: 12 (12)
fng1: 15 (15)
fng2: 18 (18)
fng3: 21 (21)
fng4: 24 (24)
scratch: 27 (27)
sql: 30 (30)
jdk: 512 (512)

M.

-- 
Michael Brown               | `One of the main causes of the fall of
Systems Consultant          | the Roman Empire was that, lacking zero,
Net Direct Inc.             | they had no way to indicate successful
☎: +1 519 883 1172 x5106    | termination of their C programs.' - Firth

#include <dirent.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>

#define _GNU_SOURCE
#define _FILE_OFFSET_BITS 64
#define __USE_FILE_OFFSET64

int
main (int argc, char *argv[])
{
	DIR *d;
	struct dirent *ent = NULL;
	char buf[sizeof(*ent)+256];

	if (argc != 2) {
		fprintf (stderr, "Usage: %s <dirname>\n", argv[0]);
		return 1;
	}

	d = opendir (argv[1]);
	if (!d) {
		fprintf (stderr, "%s: %s\n", argv[1], strerror (errno));
		return 1;
	}

	for (;;) {
		ent = NULL;
		readdir_r (d, (void *)buf, &ent);
		if (!ent)
			break;
		printf ("%s: %llu (%llu)\n", ent->d_name, ent->d_off, telldir (d));
	}

	return 0;
}
_______________________________________________
Gluster-users mailing list
[email protected]
http://supercolony.gluster.org/mailman/listinfo/gluster-users

Reply via email to