This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Linux: Implement per-thread file system attributes


* 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]