€•Ÿ,Œsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ%/translations/zh_CN/filesystems/locks”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ%/translations/zh_TW/filesystems/locks”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ%/translations/it_IT/filesystems/locks”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ%/translations/ja_JP/filesystems/locks”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ%/translations/ko_KR/filesystems/locks”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ%/translations/pt_BR/filesystems/locks”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ%/translations/sp_SP/filesystems/locks”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)”}”(hŒ SPDX-License-Identifier: GPL-2.0”h]”hŒ SPDX-License-Identifier: GPL-2.0”…””}”hh·sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1hµhhh²hh³Œ?/var/lib/git/docbuild/linux/Documentation/filesystems/locks.rst”h´KubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒFile Locking Release Notes”h]”hŒFile Locking Release Notes”…””}”(hhÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÊh²hh³hÇh´KubhŒ block_quote”“”)”}”(hŒAAndy Walker 12 May 1997 ”h]”(hŒ paragraph”“”)”}”(hŒ&Andy Walker ”h]”(hŒ Andy Walker <”…””}”(hhåh²hh³Nh´NubhŒ reference”“”)”}”(hŒandy@lysaker.kvaerner.no”h]”hŒandy@lysaker.kvaerner.no”…””}”(hhïh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”Œmailto:andy@lysaker.kvaerner.no”uh1híhhåubhŒ>”…””}”(hhåh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hãh³hÇh´KhhßubhÞ)”}”(hŒ 12 May 1997 ”h]”hä)”}”(hŒ 12 May 1997”h]”hŒ 12 May 1997”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãh³hÇh´K hj ubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K hhßubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhhÊh²hubhÉ)”}”(hhh]”(hÎ)”}”(hŒ1. What's New?”h]”hŒ1. What’s New?”…””}”(hj*h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj'h²hh³hÇh´K ubhÉ)”}”(hhh]”(hÎ)”}”(hŒ1.1 Broken Flock Emulation”h]”hŒ1.1 Broken Flock Emulation”…””}”(hj;h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj8h²hh³hÇh´Kubhä)”}”(hXThe old flock(2) emulation in the kernel was swapped for proper BSD compatible flock(2) support in the 1.3.x series of kernels. With the release of the 2.1.x kernel series, support for the old emulation has been totally removed, so that we don't need to carry this baggage forever.”h]”hXThe old flock(2) emulation in the kernel was swapped for proper BSD compatible flock(2) support in the 1.3.x series of kernels. With the release of the 2.1.x kernel series, support for the old emulation has been totally removed, so that we don’t need to carry this baggage forever.”…””}”(hjIh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãh³hÇh´Khj8h²hubhä)”}”(hŒÅThis should not cause problems for anybody, since everybody using a 2.1.x kernel should have updated their C library to a suitable version anyway (see the file "Documentation/process/changes.rst".)”h]”hŒÉThis should not cause problems for anybody, since everybody using a 2.1.x kernel should have updated their C library to a suitable version anyway (see the file “Documentation/process/changes.rstâ€.)”…””}”(hjWh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãh³hÇh´Khj8h²hubeh}”(h]”Œbroken-flock-emulation”ah ]”h"]”Œ1.1 broken flock emulation”ah$]”h&]”uh1hÈhj'h²hh³hÇh´KubhÉ)”}”(hhh]”(hÎ)”}”(hŒ1.2 Allow Mixed Locks Again”h]”hŒ1.2 Allow Mixed Locks Again”…””}”(hjph²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjmh²hh³hÇh´KubhÉ)”}”(hhh]”(hÎ)”}”(hŒ!1.2.1 Typical Problems - Sendmail”h]”hŒ!1.2.1 Typical Problems - Sendmail”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj~h²hh³hÇh´K ubhä)”}”(hX@Because sendmail was unable to use the old flock() emulation, many sendmail installations use fcntl() instead of flock(). This is true of Slackware 3.0 for example. This gave rise to some other subtle problems if sendmail was configured to rebuild the alias file. Sendmail tried to lock the aliases.dir file with fcntl() at the same time as the GDBM routines tried to lock this file with flock(). With pre 1.3.96 kernels this could result in deadlocks that, over time, or under a very heavy mail load, would eventually cause the kernel to lock solid with deadlocked processes.”h]”hX@Because sendmail was unable to use the old flock() emulation, many sendmail installations use fcntl() instead of flock(). This is true of Slackware 3.0 for example. This gave rise to some other subtle problems if sendmail was configured to rebuild the alias file. Sendmail tried to lock the aliases.dir file with fcntl() at the same time as the GDBM routines tried to lock this file with flock(). With pre 1.3.96 kernels this could result in deadlocks that, over time, or under a very heavy mail load, would eventually cause the kernel to lock solid with deadlocked processes.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãh³hÇh´K!hj~h²hubeh}”(h]”Œtypical-problems-sendmail”ah ]”h"]”Œ!1.2.1 typical problems - sendmail”ah$]”h&]”uh1hÈhjmh²hh³hÇh´K ubhÉ)”}”(hhh]”(hÎ)”}”(hŒ1.2.2 The Solution”h]”hŒ1.2.2 The Solution”…””}”(hj¨h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj¥h²hh³hÇh´K,ubhä)”}”(hŒÄThe solution I have chosen, after much experimentation and discussion, is to make flock() and fcntl() locks oblivious to each other. Both can exists, and neither will have any effect on the other.”h]”hŒÄThe solution I have chosen, after much experimentation and discussion, is to make flock() and fcntl() locks oblivious to each other. Both can exists, and neither will have any effect on the other.”…””}”(hj¶h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãh³hÇh´K-hj¥h²hubhä)”}”(hX„I wanted the two lock styles to be cooperative, but there were so many race and deadlock conditions that the current solution was the only practical one. It puts us in the same position as, for example, SunOS 4.1.x and several other commercial Unices. The only OS's that support cooperative flock()/fcntl() are those that emulate flock() using fcntl(), with all the problems that implies.”h]”hX†I wanted the two lock styles to be cooperative, but there were so many race and deadlock conditions that the current solution was the only practical one. It puts us in the same position as, for example, SunOS 4.1.x and several other commercial Unices. The only OS’s that support cooperative flock()/fcntl() are those that emulate flock() using fcntl(), with all the problems that implies.”…””}”(hjÄh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãh³hÇh´K1hj¥h²hubeh}”(h]”Œ the-solution”ah ]”h"]”Œ1.2.2 the solution”ah$]”h&]”uh1hÈhjmh²hh³hÇh´K,ubeh}”(h]”Œallow-mixed-locks-again”ah ]”h"]”Œ1.2 allow mixed locks again”ah$]”h&]”uh1hÈhj'h²hh³hÇh´KubhÉ)”}”(hhh]”(hÎ)”}”(hŒ'1.3 Mandatory Locking As A Mount Option”h]”hŒ'1.3 Mandatory Locking As A Mount Option”…””}”(hjåh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjâh²hh³hÇh´K:ubhä)”}”(hXMandatory locking was prior to this release a general configuration option that was valid for all mounted filesystems. This had a number of inherent dangers, not the least of which was the ability to freeze an NFS server by asking it to read a file for which a mandatory lock existed.”h]”hXMandatory locking was prior to this release a general configuration option that was valid for all mounted filesystems. This had a number of inherent dangers, not the least of which was the ability to freeze an NFS server by asking it to read a file for which a mandatory lock existed.”…””}”(hjóh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hãh³hÇh´K