Patch for GPFS support

Orlando Richards orlando.richards at ed.ac.uk
Mon Oct 1 03:18:05 MDT 2012


Hi all,

I got it working this time - by dropping all the "if DEBUG_GTE" bits out 
of the gpfs.c source code!

For the record - attached is the patch of what I ended up doing against 
the 3.0.9 rsync release bundle, taken with:
diff -rupN rsync-3.0.9/ rsync-3.0.9-patched/  > 
gpfs_support_rsync-3.0.9.patch

To build once patched - do:
./configure --enable-acl-support --enable-xattr-support 
--enable-gpfs-support

(make sure that libacl1-dev, or equivalent, is available).

--
Orlando.



On 28/09/12 16:11, Orlando Richards wrote:
> Some progress at my end - installing libacl1-dev on my ubuntu dev box
> has helped a bit, as has setting:
> CFLAGS=-g -O2 -DHAVE_CONFIG_H -DSUPPORT_GPFS -Wall -W
> in the Makefile built by configure.
>
> Just down to these errors now:
>
> gcc -std=gnu99 -I. -I. -g -O2 -DHAVE_CONFIG_H -DSUPPORT_GPFS -Wall -W -c
> gpfs.c -o gpfs.o
> gpfs.c: In function ‘gpfs_free_list’:
> gpfs.c:162:3: warning: implicit declaration of function ‘DEBUG_GTE’
> [-Wimplicit-function-declaration]
> gpfs.c:162:17: error: ‘ACL’ undeclared (first use in this function)
> gpfs.c:162:17: note: each undeclared identifier is reported only once
> for each function it appears in
> gpfs.c: In function ‘gpfs_receive_attr_int’:
> gpfs.c:212:16: error: ‘ACL’ undeclared (first use in this function)
> gpfs.c: In function ‘gpfs_find_attr’:
> gpfs.c:344:20: error: ‘ACL’ undeclared (first use in this function)
> gpfs.c: In function ‘gpfs_send_attr’:
> gpfs.c:403:17: error: ‘ACL’ undeclared (first use in this function)
> gpfs.c: In function ‘gpfs_get_attr’:
> gpfs.c:522:16: error: ‘ACL’ undeclared (first use in this function)
> gpfs.c: In function ‘gpfs_set_attr’:
> gpfs.c:538:16: error: ‘ACL’ undeclared (first use in this function)
> gpfs.c: In function ‘gpfs_attr_get_changed’:
> gpfs.c:601:16: error: ‘ACL’ undeclared (first use in this function)
> make: *** [gpfs.o] Error 1
>
> On 28/09/12 15:22, Orlando Richards wrote:
>> Hi all
>>
>> My apologies for dragging up a very old mail from the depths of the
>> rsync archives:
>> http://lists.samba.org/archive/rsync/2008-October/021963.html
>>
>> I'm trying to use Ronnie's patch to get rsync to copy my GPFS NFSv4
>> ACLs. I'm having trouble building Ronnie's gpfs.c though - it turns out
>> my programming isn't up to a challenge greater than "configure; make"!
>>
>> When applying the patch to, say, rsync-3.0.6 (which I think was the
>> current release when Ronnie sent this in) like this:
>>
>> mkdir -p src/rsync
>> cd src/rsync
>> wget http://rsync.samba.org/ftp/rsync/src/rsync-3.0.6.tar.gz
>> wget
>> http://lists.samba.org/archive/rsync/attachments/20081021/015484b1/rsync_gpfs_attrs-git.obj
>>
>>
>> tar -zxf rsync-3.0.6.tar.gz
>> cd rsync-3.0.6
>> patch -p1 -F3 -i ../rsync_gpfs_attrs-git.diff
>>
>> ./configure --prefix=/tmp
>> make
>>
>>
>> I get a heap of these warnings:
>>
>>
>> proto.h:111:28: warning: ‘struct esync_gpfs_attr’ declared inside
>> parameter list [enabled by default]
>> proto.h:111:28: warning: its scope is only this definition or
>> declaration, which is probably not what you want [enabled by default]
>>
>> And then the following error:
>>
>> In file included from rsync.h:920:0,
>>                   from gpfs.c:20:
>> proto.h:111:28: warning: ‘struct esync_gpfs_attr’ declared inside
>> parameter list [enabled by default]
>> proto.h:111:28: warning: its scope is only this definition or
>> declaration, which is probably not what you want [enabled by default]
>> gpfs.c:130:6: error: conflicting types for ‘gpfs_free_attr’
>> proto.h:111:6: note: previous declaration of ‘gpfs_free_attr’ was here
>> gpfs.c: In function ‘gpfs_free_sxp’:
>> gpfs.c:142:10: error: ‘stat_x’ has no member named ‘gpfs_attr’
>> gpfs.c:144:20: error: ‘stat_x’ has no member named ‘gpfs_attr’
>> gpfs.c:145:10: error: ‘stat_x’ has no member named ‘gpfs_attr’
>> gpfs.c:146:5: error: ‘stat_x’ has no member named ‘gpfs_attr’
>> gpfs.c: In function ‘gpfs_free_list’:
>> gpfs.c:162:3: warning: implicit declaration of function ‘DEBUG_GTE’
>> [-Wimplicit-function-declaration]
>> gpfs.c:162:17: error: ‘ACL’ undeclared (first use in this function)
>> gpfs.c:162:17: note: each undeclared identifier is reported only once
>> for each function it appears in
>> gpfs.c: In function ‘gpfs_receive_attr_int’:
>> gpfs.c:212:16: error: ‘ACL’ undeclared (first use in this function)
>> gpfs.c: In function ‘gpfs_find_attr’:
>> gpfs.c:344:20: error: ‘ACL’ undeclared (first use in this function)
>> gpfs.c: In function ‘gpfs_cache_attr’:
>> gpfs.c:382:33: error: ‘stat_x’ has no member named ‘gpfs_attr’
>> gpfs.c: In function ‘gpfs_send_attr’:
>> gpfs.c:398:33: error: ‘stat_x’ has no member named ‘gpfs_attr’
>> gpfs.c:403:17: error: ‘ACL’ undeclared (first use in this function)
>> gpfs.c: In function ‘gpfs_get_attr’:
>> gpfs.c:519:5: error: ‘stat_x’ has no member named ‘gpfs_attr’
>> gpfs.c:522:16: error: ‘ACL’ undeclared (first use in this function)
>> gpfs.c: In function ‘gpfs_set_attr’:
>> gpfs.c:538:16: error: ‘ACL’ undeclared (first use in this function)
>> gpfs.c: In function ‘gpfs_attr_get_changed’:
>> gpfs.c:587:10: error: ‘stat_x’ has no member named ‘gpfs_attr’
>> gpfs.c:595:37: error: ‘stat_x’ has no member named ‘gpfs_attr’
>> gpfs.c:597:21: error: ‘stat_x’ has no member named ‘gpfs_attr’
>> gpfs.c:598:7: error: ‘stat_x’ has no member named ‘gpfs_attr’
>> gpfs.c:601:16: error: ‘ACL’ undeclared (first use in this function)
>> make: *** [gpfs.o] Error 1
>>
>>
>>
>> Any guidance would be very much appreciated!
>>
>> --
>> Orlando
>>
>>
>>
>>  > List,
>>>
>>> We, IBM, have developed a patch that enhances RSYNC. This patch
>>> provides extensions to RSYNC to map to and use filesystem extensions
>>> present in the IBM GPFS cluster filesystem. (GPFS is a cluster
>>> filesystem for Linux and AIX that provides additional attributes such
>>> as NFSv4 ACLs, extended attributes and windows attributes in addition
>>> to the common posix permissions)
>>>
>>> This will greatly enhance the RSYNC functionality for users of the
>>> GPFS filesystem.
>>>
>>>
>>> We would like to contribute this patch to RSYNC and hope it will be
>>> useful for all users of GPFS. This patch may also provide
>>> ideas/startingpoint for others with  filesystems
>>> that would need to transfer additional fs-specific metadata using
>>> rsync.
>>>
>>>
>>> Please review and apply if there are no issues with the patch.
>>>
>>>
>>>
>>> best regards Ronnie Sahlberg
>>>
>>>
>>>
>>> (See attached file: README.patch)(See attached file:
>>> rsync_gpfs_attrs-git.diff) -------------- next part -------------- A
>>> non-text attachment was scrubbed... Name: README.patch Type:
>>> application/octet-stream Size: 2282 bytes Desc: not available Url :
>>>
>> http://lists.samba.org/archive/rsync/attachments/20081021/015484b1/README.obj
>>
>>
>>
>>>
>>> -------------- next part -------------- A non-text attachment was
>>> scrubbed... Name: rsync_gpfs_attrs-git.diff Type:
>>> application/octet-stream Size: 32976 bytes Desc: not available Url :
>>>
>> http://lists.samba.org/archive/rsync/attachments/20081021/015484b1/rsync_gpfs_attrs-git.obj
>>
>>
>>
>>>
>>>
>>
>
>


-- 
             --
    Dr Orlando Richards
   Information Services
IT Infrastructure Division
        Unix Section
     Tel: 0131 650 4994

The University of Edinburgh is a charitable body, registered in 
Scotland, with registration number SC005336.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gpfs_support_rsync-3.0.9.patch
Type: text/x-patch
Size: 33668 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/rsync/attachments/20121001/31f19b00/attachment.bin>


More information about the rsync mailing list