Re: [PATCH 01/14] GFS: headers

From: Arjan van de Ven
Date: Thu Sep 01 2005 - 09:20:11 EST



> +#ifndef TRUE
> +#define TRUE 1
> +#endif
> +
> +#ifndef FALSE
> +#define FALSE 0
> +#endif

eh why can't you just use the regular kernel conventions


> +
> +#define NO_CREATE 0
> +#define CREATE 1
> +
> +#define NO_WAIT 0
> +#define WAIT 1
> +
> +#define NO_FORCE 0
> +#define FORCE 1

these deserve enums


> +
> +/* Actions */
> +#define HIF_MUTEX 0
> +#define HIF_PROMOTE 1
> +#define HIF_DEMOTE 2
> +#define HIF_GREEDY 3
> +
> +/* States */
> +#define HIF_ALLOCED 4
> +#define HIF_DEALLOC 5
> +#define HIF_HOLDER 6
> +#define HIF_FIRST 7
> +#define HIF_RECURSE 8
> +#define HIF_ABORTED 9

enum?


> +#define _GFS2C_(x) (('G' << 16) | ('2' << 8) | (x))
> +
> +/* Ioctls implemented */
> +
> +#define GFS2_IOCTL_IDENTIFY _GFS2C_(1)
> +#define GFS2_IOCTL_SUPER _GFS2C_(2)

have you registered these in ioctl.txt?


> +
> +struct gfs2_ioctl {
> + unsigned int gi_argc;
> + char **gi_argv;
> +
> + char __user *gi_data;
> + unsigned int gi_size;
> + uint64_t gi_offset;
> +};

what is this for??

> +/* Endian functions */

ehhhh again why??
Why is this a compiletime hack?
Either you care about either-endian on disk, at which point it has to be
a runtime thing, or you make the on disk layout fixed endian, at which
point you really shouldn't abstract be16_to_cpu etc any further!




-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/