€•È+Œ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Œ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”…””}”(hhùhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÏhŸh³h K hhõ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?”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hjhž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¹hj$hž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.”…””}”(hj5hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÏhŸh³h Khj$hž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â€.)”…””}”(hjChžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÏhŸh³h Khj$hžhubeh}”(h]”Œbroken-flock-emulation”ah ]”h"]”Œ1.1 broken flock emulation”ah$]”h&]”uh1h´hjhžhhŸh³h Kubhµ)”}”(hhh]”(hº)”}”(hŒ1.2 Allow Mixed Locks Again”h]”hŒ1.2 Allow Mixed Locks Again”…””}”(hj\hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hjYhžhhŸh³h Kubhµ)”}”(hhh]”(hº)”}”(hŒ!1.2.1 Typical Problems - Sendmail”h]”hŒ!1.2.1 Typical Problems - Sendmail”…””}”(hjmhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hjjhž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.”…””}”(hj{hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÏhŸh³h K!hjjhžhubeh}”(h]”Œtypical-problems-sendmail”ah ]”h"]”Œ!1.2.1 typical problems - sendmail”ah$]”h&]”uh1h´hjYhž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´hjYhžhhŸh³h K,ubeh}”(h]”Œallow-mixed-locks-again”ah ]”h"]”Œ1.2 allow mixed locks again”ah$]”h&]”uh1h´hjhž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