<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/fs/ceph/locks.c, branch v4.9</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>ceph: fix mandatory flock check</title>
<updated>2016-10-03T14:13:49+00:00</updated>
<author>
<name>Yan, Zheng</name>
<email>zyan@redhat.com</email>
</author>
<published>2016-09-13T02:15:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=db4a63aab43b2040292b2023512864702b5f9799'/>
<id>db4a63aab43b2040292b2023512864702b5f9799</id>
<content type='text'>
Signed-off-by: Yan, Zheng &lt;zyan@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Yan, Zheng &lt;zyan@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Move locks API users to locks_lock_inode_wait()</title>
<updated>2015-10-22T18:57:36+00:00</updated>
<author>
<name>Benjamin Coddington</name>
<email>bcodding@redhat.com</email>
</author>
<published>2015-10-22T17:38:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4f6563677ae833baad8003e14353241bc25da4fc'/>
<id>4f6563677ae833baad8003e14353241bc25da4fc</id>
<content type='text'>
Instead of having users check for FL_POSIX or FL_FLOCK to call the correct
locks API function, use the check within locks_lock_inode_wait().  This
allows for some later cleanup.

Signed-off-by: Benjamin Coddington &lt;bcodding@redhat.com&gt;
Signed-off-by: Jeff Layton &lt;jeff.layton@primarydata.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of having users check for FL_POSIX or FL_FLOCK to call the correct
locks API function, use the check within locks_lock_inode_wait().  This
allows for some later cleanup.

Signed-off-by: Benjamin Coddington &lt;bcodding@redhat.com&gt;
Signed-off-by: Jeff Layton &lt;jeff.layton@primarydata.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ceph: fix ceph_encode_locks_to_buffer()</title>
<updated>2015-07-31T08:38:47+00:00</updated>
<author>
<name>Yan, Zheng</name>
<email>zyan@redhat.com</email>
</author>
<published>2015-07-07T08:18:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f6762cb2ca48e9052b5233c338fa254fa58d8981'/>
<id>f6762cb2ca48e9052b5233c338fa254fa58d8981</id>
<content type='text'>
posix locks should be in ctx-&gt;flc_posix list

Signed-off-by: Yan, Zheng &lt;zyan@redhat.com&gt;
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
posix locks should be in ctx-&gt;flc_posix list

Signed-off-by: Yan, Zheng &lt;zyan@redhat.com&gt;
Signed-off-by: Ilya Dryomov &lt;idryomov@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "locks: keep a count of locks on the flctx lists"</title>
<updated>2015-02-16T19:32:03+00:00</updated>
<author>
<name>Jeff Layton</name>
<email>jeff.layton@primarydata.com</email>
</author>
<published>2015-02-16T19:32:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e084c1bd40926938ff8d26af3bde34396dd4d06d'/>
<id>e084c1bd40926938ff8d26af3bde34396dd4d06d</id>
<content type='text'>
This reverts commit 9bd0f45b7037fcfa8b575c7e27d0431d6e6dc3bb.

Linus rightly pointed out that I failed to initialize the counters
when adding them, so they don't work as expected. Just revert this
patch for now.

Reported-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Jeff Layton &lt;jeff.layton@primarydata.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 9bd0f45b7037fcfa8b575c7e27d0431d6e6dc3bb.

Linus rightly pointed out that I failed to initialize the counters
when adding them, so they don't work as expected. Just revert this
patch for now.

Reported-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Jeff Layton &lt;jeff.layton@primarydata.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>locks: keep a count of locks on the flctx lists</title>
<updated>2015-01-16T21:08:50+00:00</updated>
<author>
<name>Jeff Layton</name>
<email>jlayton@primarydata.com</email>
</author>
<published>2015-01-16T20:05:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=9bd0f45b7037fcfa8b575c7e27d0431d6e6dc3bb'/>
<id>9bd0f45b7037fcfa8b575c7e27d0431d6e6dc3bb</id>
<content type='text'>
This makes things a bit more efficient in the cifs and ceph lock
pushing code.

Signed-off-by: Jeff Layton &lt;jlayton@primarydata.com&gt;
Acked-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes things a bit more efficient in the cifs and ceph lock
pushing code.

Signed-off-by: Jeff Layton &lt;jlayton@primarydata.com&gt;
Acked-by: Christoph Hellwig &lt;hch@lst.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>locks: add a dedicated spinlock to protect i_flctx lists</title>
<updated>2015-01-16T21:08:49+00:00</updated>
<author>
<name>Jeff Layton</name>
<email>jlayton@primarydata.com</email>
</author>
<published>2015-01-16T20:05:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6109c85037e53443f29fd39c0de69f578a1cf285'/>
<id>6109c85037e53443f29fd39c0de69f578a1cf285</id>
<content type='text'>
We can now add a dedicated spinlock without expanding struct inode.
Change to using that to protect the various i_flctx lists.

Signed-off-by: Jeff Layton &lt;jlayton@primarydata.com&gt;
Acked-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We can now add a dedicated spinlock without expanding struct inode.
Change to using that to protect the various i_flctx lists.

Signed-off-by: Jeff Layton &lt;jlayton@primarydata.com&gt;
Acked-by: Christoph Hellwig &lt;hch@lst.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>locks: convert posix locks to file_lock_context</title>
<updated>2015-01-16T21:08:16+00:00</updated>
<author>
<name>Jeff Layton</name>
<email>jlayton@primarydata.com</email>
</author>
<published>2015-01-16T20:05:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=bd61e0a9c852de2d705b6f1bb2cc54c5774db570'/>
<id>bd61e0a9c852de2d705b6f1bb2cc54c5774db570</id>
<content type='text'>
Signed-off-by: Jeff Layton &lt;jlayton@primarydata.com&gt;
Acked-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Jeff Layton &lt;jlayton@primarydata.com&gt;
Acked-by: Christoph Hellwig &lt;hch@lst.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>locks: move flock locks to file_lock_context</title>
<updated>2015-01-16T20:09:25+00:00</updated>
<author>
<name>Jeff Layton</name>
<email>jlayton@primarydata.com</email>
</author>
<published>2015-01-16T20:05:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=5263e31e452fb84138b9bee061d5c06c0f359fea'/>
<id>5263e31e452fb84138b9bee061d5c06c0f359fea</id>
<content type='text'>
Signed-off-by: Jeff Layton &lt;jlayton@primarydata.com&gt;
Acked-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Jeff Layton &lt;jlayton@primarydata.com&gt;
Acked-by: Christoph Hellwig &lt;hch@lst.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ceph: move spinlocking into ceph_encode_locks_to_buffer and ceph_count_locks</title>
<updated>2015-01-16T20:09:25+00:00</updated>
<author>
<name>Jeff Layton</name>
<email>jlayton@primarydata.com</email>
</author>
<published>2015-01-16T20:05:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=c362781cadd37858c3d8f5d18b1e9957d4671298'/>
<id>c362781cadd37858c3d8f5d18b1e9957d4671298</id>
<content type='text'>
There is only a single call site for each of these functions, and the
caller takes the i_lock prior to calling them and drops it just
afterward. Move the spinlocking into the functions instead.

Signed-off-by: Jeff Layton &lt;jlayton@primarydata.com&gt;
Acked-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is only a single call site for each of these functions, and the
caller takes the i_lock prior to calling them and drops it just
afterward. Move the spinlocking into the functions instead.

Signed-off-by: Jeff Layton &lt;jlayton@primarydata.com&gt;
Acked-by: Christoph Hellwig &lt;hch@lst.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ceph: fix file lock interruption</title>
<updated>2014-12-17T17:09:49+00:00</updated>
<author>
<name>Yan, Zheng</name>
<email>zyan@redhat.com</email>
</author>
<published>2014-10-14T02:33:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=9280be24dc9c7aaee230de3ed33f8357386de9a2'/>
<id>9280be24dc9c7aaee230de3ed33f8357386de9a2</id>
<content type='text'>
When a lock operation is interrupted, current code sends a unlock request to
MDS to undo the lock operation. This method does not work as expected because
the unlock request can drop locks that have already been acquired.

The fix is use the newly introduced CEPH_LOCK_FCNTL_INTR/CEPH_LOCK_FLOCK_INTR
requests to interrupt blocked file lock request. These requests do not drop
locks that have alread been acquired, they only interrupt blocked file lock
request.

Signed-off-by: Yan, Zheng &lt;zyan@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When a lock operation is interrupted, current code sends a unlock request to
MDS to undo the lock operation. This method does not work as expected because
the unlock request can drop locks that have already been acquired.

The fix is use the newly introduced CEPH_LOCK_FCNTL_INTR/CEPH_LOCK_FLOCK_INTR
requests to interrupt blocked file lock request. These requests do not drop
locks that have alread been acquired, they only interrupt blocked file lock
request.

Signed-off-by: Yan, Zheng &lt;zyan@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
