From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 Date: Fri, 10 Jun 2011 11:22:59 +0800 Message-ID: From: niko Content-Type: multipart/alternative; boundary=00163641725b239d7604a55316b8 Subject: [linux-lvm] memlock_inc increased device open count problem Reply-To: LVM general discussion and development List-Id: LVM general discussion and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , List-Id: To: linux-lvm@redhat.com --00163641725b239d7604a55316b8 Content-Type: text/plain; charset=ISO-8859-1 Hi,everyone I'm using mpatocka's patches for shared snapshot on RHEL6. Problem occurred when creating shared cow storage volume. the same problem occurred when creating snapshot I got error message: Unable to deactivate open vgtest-orig--shared (253:2) Aborting. Couldn't deactivate snapshot COW area. Manual intervention required. Then,I did some digging, in lv_deactivate @@ -1117,6 +1121,9 @@ stack; memlock_inc(cmd); + if (!lv_info(cmd, lv, 0, &info, 1, 0)) + goto_out; + log_verbose("lv_deactivate: open_count %d", info.open_count); r = _lv_deactivate(lv); memlock_dec(cmd); fs_unlock(); it turns out : lv_deactivate: open_count 1 before memlock_inc, open_count is 0 I wonder how it changes to 1 ? -- niko --00163641725b239d7604a55316b8 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi,everyone
I'm using mpatocka's patches for shared = snapshot on RHEL6.
Problem occurred when creating shared cow stor= age volume.
the same problem occurred when creating snapshot
I got error message:
=A0
=A0 Unable to deactivate = open vgtest-orig--shared (253:2)
=A0 Aborting. Couldn't deactivate s= napshot COW area. Manual intervention required.
Then,I did so= me digging,=A0in lv_deactivate
=A0
@@ -1117,6 +1121,9 @@
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0 stack;
=A0=A0=A0=A0=A0=A0=A0 memlock_inc(cmd);+=A0=A0=A0=A0=A0=A0 if (!lv_info(cmd, lv, 0, &info, 1, 0))
+=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 goto_out;
+=A0=A0=A0=A0=A0=A0 log_v= erbose("lv_deactivate: open_count %d", info.open_count);
=A0=A0=A0=A0=A0=A0=A0 r =3D _lv_deactivate(lv);
=A0=A0=A0=A0=A0=A0=A0 me= mlock_dec(cmd);
=A0=A0=A0=A0=A0=A0=A0 fs_unlock();
it turn= s out :
=A0
=A0lv_deactivate: open_count=A01
<= div>before memlock_inc, open_count is 0
=A0
I wonder how it changes to 1 ?

--
niko=
--00163641725b239d7604a55316b8--