[Gluster-devel] [FreeBSD: Fixes]
Harshavardhana
harsha at zresearch.com
Fri Feb 9 06:00:32 UTC 2007
Amar,
Well that might be a concern now :O. But for regarding FreeBSD port
i saw an API missing in the
Extended Attributes for UFS (Unix File System). like the setxattr
call. I did write a wrapper
around the setxattr and many others like this but i felt do
discard the idea of porting as the
XATTR_CREATE and XATTR_REPLACE missing from the extattr API of the
FreeBSD. This is on
FreeBSD 6.1-RELEASE. Have a look at the below code.
------ SNIP -----------
ssize_t bsd_setxattr (const char *path, const char *name,
void *value, ssize_t size, u_int32_t position,
int options)
{
int rv = 0;
int nofollow;
if (position != 0) {
return -1;
}
nofollow = options & XATTR_XATTR_NOFOLLOW;
options &= ~XATTR_XATTR_NOFOLLOW;
if (options == XATTR_XATTR_CREATE ||
options == XATTR_XATTR_REPLACE) {
/* FreeBSD doesn't have this in its extattr API :( */
}
else if (options != 0) {
return -1;
}
if (options & XATTR_XATTR_NOFOLLOW) {
rv = extattr_set_link (path, EXTATTR_NAMESPACE_USER,
name, value, size);
}
else {
rv = extattr_set_file (path, EXTATTR_NAMESPACE_USER,
name, value, size);
}
/* FreeBSD returns written length on success not zero */
if (rv >= 0) {
return 0;
}
else {
return rv;
}
}
------- SNIP --------
And for the compatibility issues, if in future we are going for any port
on Solaris based systems. Then we need to put a check for all GNU Glibc
specific functions,headers in configure.ac and use of AC_CANONICAL_HOST
will be must for checking ${host_os}.
Gracias,
Harshavardhana
> Avati,
> Harsha concern was to make epoll changes compatible with unix systems.
> I think you need to add the check in configure.ac atleast.
>
> -bulde
>
> On Thu, Feb 08, 2007 at 05:54:08AM -0800, Anand Avati wrote:
>> My previous commit changed our polling to epoll
>>
>> avati
>>
>>
>> On Thu, Feb 08, 2007 at 04:45:34PM +0530, Harshavardhana wrote:
>> > Hi amar,
>> > Have you guys looked @ **** epoll benchmark ****
>> > http://www.kegel.com/poller/. Have a look
>> > seems good for checking out epoll implementation of glusterfs??.
>> > Gracias,
>> > -Harshavardhana
>> >
>> > > Commited the fixes.
>> > >
>> > > Gracias,
>> > > -bulde
>> > >
>> > > --
>> > > Happy Hacking
>> > >
>> >
>> >
>> > --
>> > Harshavardhana
>> > "Software gets slower faster as Hardware gets faster"
>> >
>> >
>>
>> --
>> Shaw's Principle:
>> Build a system that even a fool can use,
>> and only a fool will want to use it.
>>
>
>
--
Harshavardhana
"Software gets slower faster as Hardware gets faster"
More information about the Gluster-devel
mailing list