That won't work for out of tree fsals, right? Either decouple them
with a pointer or have a suitable macro to convert. To avoid split
allocs, a macro would be better.

Regards, Malahal.
PS: #define GPFS_STATE2FD(state) ((struct gpfs_fd
*)((state)+sizeof(struct state_t))) # similar for other fsal!

On Thu, Feb 23, 2017 at 2:13 PM, Swen Schillig <s...@vnet.ibm.com> wrote:
> All
>
> while removing some legacy GPFS code I stumbled over this
>
>         my_fd = (struct gpfs_fd *)(state + 1);
>
> which is probably just copied from an early version to all our FSALs.
>
> Since we're still in dev for 2.5 I'd volunteer and "transfer" this
> into maybe this
>
> struct state_t {
>         ...
>         union {
>         struct gluster_fd gluster;
>         struct ceph_fd fd ceph;
>         struct gpfs_fd gpfs;
>         struct vfs_fd vfs;
>         } fd;
> }
>
> comments ?
>
> Swen
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Nfs-ganesha-devel mailing list
> Nfs-ganesha-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Nfs-ganesha-devel mailing list
Nfs-ganesha-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel

Reply via email to