Add support for gluster backing store
PATCH 1/1 Add support for gluster backing store
Gluster is a distributed file system (www.gluster.org). The backing store gives block access protocols such as iSCSI access to data within gluster.
Gluster data resides on volumes which are physically located on servers. A "LUN" is represented by a file within a volume. To specify which file to use:
--bstype=glfs
--backing-store="volume@hostname:filename"
Optionally, logs may be specified. See README.glfs
All I/Os are synchronous. This is based off the rdrw and rbd backend storage drivers.
--- Makefile | 1 + doc/README.glfs | 50 +++++ usr/Makefile | 7 + usr/bs_glfs.c | 561 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 619 insertions(+) create mode 100644 doc/README.glfs create mode 100644 usr/bs_glfs.c
Makefile +1 -0
@@ -12,6 +12,7 @@ export VERSION PREFIX # Export the feature switches so sub-make knows about them export ISCSI_RDMA export CEPH_RBD +export GLFS_BD .PHONY: all all: programs doc conf scripts
doc/README.glfs new file +50 -0
50 lines not on this page · raw message
usr/Makefile +7 -0
@@ -17,6 +17,10 @@ ifneq ($(CEPH_RBD),) MODULES += bs_rbd.so endif +ifneq ($(GLFS_BD),) +MODULES += bs_glfs.so +endif + ifneq ($(shell test -e /usr/include/sys/eventfd.h && test -e /usr/include/libaio.h && echo 1),) CFLAGS += -DUSE_EVENTFD TGTD_OBJS += bs_aio.o
@@ -88,6 +92,9 @@ tgtimg: $(TGTIMG_OBJS) bs_rbd.so: bs_rbd.c $(CC) -shared $(CFLAGS) bs_rbd.c -o bs_rbd.so -lrados -lrbd +bs_glfs.so: bs_glfs.c + $(CC) -I/usr/include/glusterfs/api -shared $(CFLAGS) bs_glfs.c -o bs_glfs.so -lgfapi + .PHONY: install install: $(PROGRAMS) $(MODULES) install -d -m 755 $(DESTDIR)$(sbindir)
usr/bs_glfs.c new file +561 -0
561 lines not on this page · raw message
Signature · 1 line
1.8.5.3
Quoted 16 lines · On Wed, 12 Mar 2014 10:55:24 -0400 Dan Lambright <[email protected]> wrote:
Gluster is a distributed file system (www.gluster.org). The backing store gives block access protocols such as iSCSI access to data within gluster.
Gluster data resides on volumes which are physically located on servers. A "LUN" is represented by a file within a volume. To specify which file to use:
--bstype=glfs
--backing-store="volume@hostname:filename"Optionally, logs may be specified. See README.glfs
All I/Os are synchronous. This is based off the rdrw and rbd backend storage drivers.
Quoted 6 lines
Signed-off-by Dan Lambright <[email protected]>--- Makefile | 1 + doc/README.glfs | 50 +++++ usr/Makefile | 7 + usr/bs_glfs.c | 561 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Thanks! Can you fix the following some style errors?
fujita@rose:~/git/tgt$ ./scripts/checkpatch.pl
~/0001-Add-support-for-gluster-backing-store.patch
WARNING: quoted string split across lines
#370: FILE: usr/bs_glfs.c:239:
+ eprintf("Failed to punch hole for "
+ "WRITE_SAME
command\n");WARNING: quoted string split across lines
#481: FILE: usr/bs_glfs.c:350:
+ eprintf("Failed to punch hole for"
+ "
UNMAP at offset:%" PRIu64
WARNING: line over 80 characters
#557: FILE: usr/bs_glfs.c:426:
+ ret = glfs_set_volfile_server(fs, "tcp", servername,GLUSTER_PORT);
ERROR: code indent should use tabs where possible
#615: FILE: usr/bs_glfs.c:484:
+ /* Jump past the semicolon, if we stopped at one */$
ERROR: code indent should use tabs where possible
#616: FILE: usr/bs_glfs.c:485:
+ if (**p == ';')$
WARNING: please, no spaces at the start of a line
#616: FILE: usr/bs_glfs.c:485:
+ if (**p == ';')$
ERROR: code indent should use tabs where possible
#617: FILE: usr/bs_glfs.c:486:
+ *p = end + 1;$
WARNING: please, no spaces at the start of a line
#617: FILE: usr/bs_glfs.c:486:
+ *p = end + 1;$
total: 3 errors, 5 warnings, 637 lines checked
NOTE: whitespace errors detected, you may wish to use scripts/cleanpatch or
scripts/cleanfile
/home/fujita/0001-Add-support-for-gluster-backing-store.patch has style problems, please review.
If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS.