On Do, 2017-02-23 at 14:28 +0530, Malahal Naineni wrote: > 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! > Didn't realize that there is support for out of tree FSALs.
But, isn't that the same thing just wrapped a little nicer ? I simply don't like code fragments with side-effects and I would consider the removal of the gpfs_fd-memory by doing a free(state) a side-effect. However, I agree that this would already be an improvement with very little effort. Swen > 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