From: Stefan Richter <stefanr@s5r6.in-berlin.de> To: Sage Weil <sage@newdream.net> Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, greg@kroah.com Subject: Re: [PATCH 17/21] ceph: nfs re-export support Date: Sat, 20 Jun 2009 11:12:27 +0200 [thread overview] Message-ID: <4A3CA7FB.60707@s5r6.in-berlin.de> (raw) In-Reply-To: <1245450702-31343-18-git-send-email-sage@newdream.net> 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/
WARNING: multiple messages have this Message-ID (diff)
From: Stefan Richter <stefanr@s5r6.in-berlin.de> To: Sage Weil <sage@newdream.net> Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, greg@kroah.com Subject: Re: [PATCH 17/21] ceph: nfs re-export support Date: Sat, 20 Jun 2009 11:12:27 +0200 [thread overview] Message-ID: <4A3CA7FB.60707@s5r6.in-berlin.de> (raw) In-Reply-To: <1245450702-31343-18-git-send-email-sage@newdream.net> 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/
next prev parent reply other threads:[~2009-06-20 9:12 UTC|newest] Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top 2009-06-19 22:31 [PATCH 00/21] ceph: Ceph distributed file system client v0.9 Sage Weil 2009-06-19 22:31 ` [PATCH 01/21] fs: add fs/staging directory Sage Weil 2009-06-19 22:31 ` [PATCH 02/21] ceph: documentation Sage Weil 2009-06-19 22:31 ` [PATCH 03/21] ceph: on-wire types Sage Weil 2009-06-19 22:31 ` [PATCH 04/21] ceph: client types Sage Weil 2009-06-19 22:31 ` [PATCH 05/21] ceph: super.c Sage Weil 2009-06-19 22:31 ` [PATCH 06/21] ceph: inode operations Sage Weil 2009-06-19 22:31 ` [PATCH 07/21] ceph: directory operations Sage Weil 2009-06-19 22:31 ` [PATCH 08/21] ceph: file operations Sage Weil 2009-06-19 22:31 ` [PATCH 09/21] ceph: address space operations Sage Weil 2009-06-19 22:31 ` [PATCH 10/21] ceph: MDS client Sage Weil 2009-06-19 22:31 ` [PATCH 11/21] ceph: OSD client Sage Weil 2009-06-19 22:31 ` [PATCH 12/21] ceph: CRUSH mapping algorithm Sage Weil 2009-06-19 22:31 ` [PATCH 13/21] ceph: monitor client Sage Weil 2009-06-19 22:31 ` [PATCH 14/21] ceph: capability management Sage Weil 2009-06-19 22:31 ` [PATCH 15/21] ceph: snapshot management Sage Weil 2009-06-19 22:31 ` [PATCH 16/21] ceph: messenger library Sage Weil 2009-06-19 22:31 ` [PATCH 17/21] ceph: nfs re-export support Sage Weil 2009-06-19 22:31 ` [PATCH 18/21] ceph: ioctls Sage Weil 2009-06-19 22:31 ` [PATCH 19/21] ceph: debugging Sage Weil 2009-06-19 22:31 ` [PATCH 20/21] ceph: debugfs Sage Weil 2009-06-19 22:31 ` [PATCH 21/21] ceph: Kconfig, Makefile Sage Weil 2009-06-20 9:12 ` Stefan Richter [this message] 2009-06-20 9:12 ` [PATCH 17/21] ceph: nfs re-export support Stefan Richter 2009-06-20 20:39 ` Sage Weil 2009-06-20 21:22 ` Stefan Richter 2009-06-20 21:22 ` Stefan Richter 2009-06-19 22:44 ` [PATCH 00/21] ceph: Ceph distributed file system client v0.9 Greg KH 2009-06-19 23:15 ` Sage Weil 2009-06-19 23:20 ` Greg KH 2009-06-19 22:45 ` Greg KH 2009-06-19 22:54 ` Stephen Rothwell 2009-06-19 23:12 ` Sage Weil 2009-06-19 23:19 ` Greg KH
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=4A3CA7FB.60707@s5r6.in-berlin.de \ --to=stefanr@s5r6.in-berlin.de \ --cc=greg@kroah.com \ --cc=linux-fsdevel@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=sage@newdream.net \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.