[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4A3CA7FB.60707@s5r6.in-berlin.de>
Date: Sat, 20 Jun 2009 11:12:27 +0200
From: Stefan Richter <stefanr@...6.in-berlin.de>
To: Sage Weil <sage@...dream.net>
CC: linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
greg@...ah.com
Subject: Re: [PATCH 17/21] ceph: nfs re-export support
Sage Weil wrote:
> +++ b/fs/staging/ceph/export.c
...
> +static struct dentry *ceph_fh_to_parent(struct super_block *sb, struct fid *fid,
> + int fh_len, int fh_type)
> +{
> + u32 *fh = fid->raw;
> + u64 ino = *(u64 *)fh;
> + u32 hash = fh[2];
> +
> + derr(10, "fh_to_parent %llx.%x\n", ino, hash);
> +
> + if (fh_len < 6)
> + return ERR_PTR(-ESTALE);
> +
> + return __fh_to_dentry(sb, (struct ceph_export_item *)fh + 1,
> + fh_len/IPSZ - 1);
> +}
fid->raw could be 32-bit aligned, couldn't it?
#include <asm/unaligned.h>
u64 ino = get_unaligned((u64 *)fh);
derr(10, "fh_to_parent %llx.%x\n",
(unsigned long long)ino, hash);
(not tested)
I remember somebody saying that u64 should become unsigned long long on
all architectures eventually; is there still such a plan?
--
Stefan Richter
-=====-==--= -==- =-=--
http://arcgraph.de/sr/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists