RFR: 8229872: (fs) Increase buffer size used with getmntent
Vladimir Kempik
vkempik at azul.com
Tue Aug 20 13:43:49 UTC 2019
Hello
I’m planning to sync setmntent/getmntent on some object via MonitorEnter/Exit to prevent race condition.
But where to get some jobject ?
Should I pass it from caller (java method), but then It needs to be some static object.
Or should I create my own on first usage of setmntent ?
Thanks, Vladimir.
> 19 авг. 2019 г., в 16:18, Florian Weimer <fweimer at redhat.com> написал(а):
>
> * Vladimir Kempik:
>
>> Maybe it can be done it this way:
>>
>> in jni’s Java_sun_nio_fs_LinuxNativeDispatcher_setmntent0
>>
>> go thru file line by line ( with getline) and find longest line, then rewind to file begin.
>
> Interesting idea. It still has a small race condition. But it might be
> the best compromise between amount of changes required and gains in
> robustness.
>
> Thanks,
> Florian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20190820/e0bba836/signature.asc>
More information about the nio-dev
mailing list