This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Linux: Implement per-thread file system attributes
- From: Florian Weimer <fweimer at redhat dot com>
- To: libc-alpha at sourceware dot org
- Cc: Jeremy Allison <jra at samba dot org>
- Date: Fri, 08 Feb 2019 13:31:51 +0100
- Subject: Re: [PATCH] Linux: Implement per-thread file system attributes
- References: <87o9a6vkl3.fsf@oldenburg.str.redhat.com> <87zht9okwh.fsf@oldenburg2.str.redhat.com>
* Florian Weimer:
> * Florian Weimer:
>
>> This commit adds the functions pthread_attr_setperthreadfs_np and
>> pthread_attr_getperthreadfs_np.
>>
>> The implementation is based on suppressing the CLONE_FS clone flag when
>> creating the new thread.
>>
>> 2018-11-30 Florian Weimer <fweimer@redhat.com>
>>
>> Linux: Implement per-thread file system attributes.
>
> Original patch:
>
> <https://sourceware.org/ml/libc-alpha/2018-11/msg00866.html>
>
> It turns out that Samba uses something quite similar today: They call
> unshare (CLONE_FS) from certain threads to obtain private file system
> attributes. So there is some demand for this functionality.
>
> The main question is whether the interfaces should stick literally to
> other POSIX attribute functions and use this instead:
>
> int pthread_attr_setperthreadfs_np (pthread_attr_t *__attr, int __enabled)
> __THROW __nonnull ((1));
> int pthread_attr_getperthreadfs_np (const pthread_attr_t *, int *__enabled)
> __THROW __nonnull ((1, 2));
>
> The patch currently has:
>
> void pthread_attr_setperthreadfs_np (pthread_attr_t *__attr, int __enabled)
> __THROW __nonnull ((1));
> int pthread_attr_getperthreadfs_np (const pthread_attr_t *__attr)
> __THROW __nonnull ((1));
>
> I have no strong opinion on this matter.
>
> (I will write documentation once the API is approved for inclusion.)
Ping?
If someone could do a conceptual review of the original patch, I can
rebase it to current master for an actual review.
Thanks,
Florian