Skip to content

Commit a8325a2

Browse files
ShyamsundarRgluster-ant
authored andcommitted
posix: Reorganize posix xlator to prepare for reuse with rio
1. Split out entry and inode/fd based FOPs into separate files from posix.c 2. Split out common routines (init, fini, reconf, and such) into its own file, from posix.c 3. Retain just the method assignments in posix.c (such that posix2 for RIO can assign its own methods in the future for entry operations and such) 4. Based on the split in (1) and (2) split out posix-handle.h into 2 files, such that macros that are needed for inode ops are in one and rest are in the other If the split is done as above, posix2 can compile with its own entry ops, and hence not compile, the entry ops as split in (1) above. The split described in (4) can again help posix2 to define its own macros to make entry and inode handles, thus not impact existing POSIX xlator code. Noted problems - There are path references in certain cases where quota is used (in the xattr FOPs), and thus will fail on reuse in posix2, this needs to be handled when we get there. - posix_init does set root GFID on the brick root, and this is incorrect for posix2, again will need handling later when posix2 evolves based on this code (other init checks seem fine on current inspection) Merge of experimental branch patches with the following gerrit change-IDs > Change-Id: I965ce6dffe70a62c697f790f3438559520e0af20 > Change-Id: I089a4d9cf470c2f9c121611e8ef18dea92b2be70 > Change-Id: I2cec103f6ba8f3084443f3066bcc70b2f5ecb49a Fixes #327 Change-Id: I0ccfa78559a7c5a68f5e861e144cf856f5c9e19c Signed-off-by: ShyamsundarR <srangana@redhat.com>
1 parent 1ce53de commit a8325a2

11 files changed

Lines changed: 8833 additions & 8340 deletions

File tree

xlators/storage/posix/src/Makefile.am

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/storage
55
posix_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)
66

77
posix_la_SOURCES = posix.c posix-helpers.c posix-handle.c posix-aio.c \
8-
posix-gfid-path.c
8+
posix-gfid-path.c posix-entry-ops.c posix-inode-fd-ops.c \
9+
posix-common.c
910
posix_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la $(LIBAIO) \
1011
$(ACL_LIBS)
1112

1213
noinst_HEADERS = posix.h posix-mem-types.h posix-handle.h posix-aio.h \
13-
posix-messages.h posix-gfid-path.h
14+
posix-messages.h posix-gfid-path.h posix-inode-handle.h
1415

1516
AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
1617
-I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src \

0 commit comments

Comments
 (0)