Fix assorted FS-Cache issues
Subsystems (2)
Hi Linus,
Can you please pull this GIT branch? It contains a number of fixes for various FS-Cache issues plus some cleanups. The commits are, in order:
(1) Provide a system wait_on_atomic_t() and wake_up_atomic_t() sharing the bit-wait table (enhancement for #8).
(2) Don't put spin_lock() in a while-condition as spin_lock() may have a do {} while(0) wrapper (cleanup).
(3) Symbolically name i_mutex lock classes rather than using numbers in CacheFiles (cleanup).
(4) Don't sleep in page release if __GFP_FS is not set (deadlock vs ext4).
(5) Uninline fscache_object_init() (cleanup for #7).
(6) Wrap checks on object state (cleanup for #7).
(7) Simplify the object state machine by separating work states from wait states.
(8) Simplify cookie retention by objects (NULL pointer deref fix).
(9) Remove unused list_to_page() macro (cleanup).
(10) Make the remaining-pages counter in the retrieval op atomic (assertion failure fix).
(11) Don't use spin_is_locked() in assertions (assertion failure fix).
This is tagged with fscache-20130702. This is the same as fscache-20130619 but with added acks.
Thanks,
David
---
The following changes since commit b973425cbb51e08301b34fecdfd476a44507d8cf:
Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 (2013-05-14 09:30:54 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git tags/fscache-20130702
for you to fetch changes up to dcfae32f892f03dee9896b19d1960c1ecd3f0583:
FS-Cache: Don't use spin_is_locked() in assertions (2013-06-19 14:16:47 +0100)
----------------------------------------------------------------
(from the branch description for fscache local branch)
clone of "master"
FS-Cache patches 2013-07-02
----------------------------------------------------------------
David Howells (8):
Add wait_on_atomic_t() and wake_up_atomic_t()
FS-Cache: Don't sleep in page release if __GFP_FS is not set
FS-Cache: Uninline fscache_object_init()
FS-Cache: Wrap checks on object state
FS-Cache: Fix object state machine to have separate work and wait states
FS-Cache: Simplify cookie retention for fscache_objects, fixing oops
FS-Cache: The retrieval remaining-pages counter needs to be atomic_t
FS-Cache: Don't use spin_is_locked() in assertions
Haicheng Li (1):
cachefiles: remove unused macro list_to_page()
J. Bruce Fields (1):
CacheFiles: name i_mutex lock class explicitly
Sebastian Andrzej Siewior (1):
fs/fscache: remove spin_lock() from the condition in while()
fs/cachefiles/interface.c | 13 +- fs/cachefiles/namei.c | 10 +- fs/cachefiles/xattr.c | 6 +- fs/fscache/cache.c | 34 +- fs/fscache/cookie.c | 93 ++-- fs/fscache/fsdef.c | 1 + fs/fscache/internal.h | 11 +- fs/fscache/main.c | 11 +- fs/fscache/netfs.c | 1 + fs/fscache/object-list.c | 103 ++-- fs/fscache/object.c | 1106 +++++++++++++++++++++-------------------- fs/fscache/operation.c | 37 +- fs/fscache/page.c | 65 ++- include/linux/fscache-cache.h | 175 +++---- include/linux/wait.h | 24 + kernel/wait.c | 88 ++++ 16 files changed, 956 insertions(+), 822 deletions(-)
Quoted 11 lines · On Tue, 02 Jul 2013 15:27:36 +0100 David Howells <[email protected]> wrote:
Hi Linus,
The following changes since commit
b973425cbb51e08301b34fecdfd476a44507d8cf:Merge tag '
ext4_for_linus_stable' ofgit://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4(2013-05-14 09:30:54 -0700)are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.gittags/fscache-20130702
/me wonders where this has been hiding for the last month and a half ...
Signature · 2 lines
Cheers, Stephen Rothwell [email protected]
Quoted 7 lines · On Wed, 3 Jul 2013 09:38:15 +1000 Stephen Rothwell <[email protected]> wrote:
Quoted 5 lines · On Tue, 02 Jul 2013 15:27:36 +0100 David Howells <[email protected]> wrote:
Hi Linus,
The following changes since commit
b973425cbb51e08301b34fecdfd476a44507d8cf:
Quoted 8 lines
Quoted 6 lines
Merge tag '
ext4_for_linus_stable' ofgit://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4(2013-05-14 09:30:54 -0700)are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.gittags/fscache-20130702/me wonders where this has been hiding for the last month and a half ...
Ah ha! they have been in linux-next as a different set of commits based in the same commit and some with even the same commit date/times ...
Oh, well, at least the other set have been removed form linux-next today.
Signature · 2 lines
Cheers, Stephen Rothwell [email protected]
Quoted 3 lines · Stephen Rothwell
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.gittags/fscache-20130702/me wonders where this has been hiding for the last month and a half ...
I asked you to pull my fscache branch on the 23rd May, and you replied on the 27th May saying you'd done so.
Looking in next-20130531 and next-20130527 in linux-next:
+fscache ccce57fed1ffb98ad4ff7c290276ca266435ad19
Looking in next-20130603 and next-20130701, I see:
+fscache bbd645c7a7b56f170940e81335ba4549f50aae95
in the Next/SHA1s file. This is the same as the fscache-20130619 tag that I emplaced today, though the fscache _branch_ you've been pulling had been at that point for over a month (not yet a month and a half, I will admit). git request-pull seems to pick up tags in preference to branch points.
Comparing fscache-20130619 to fscache-20130702 shows:
warthog>git diff fscache-20130619 fscache-20130702 | wc -l 0
The only difference being in the descriptions (additional Acked-by lines).
I picked 19th June for the old tag name because that was the date I added in the Acked-by lines, so this pins the point just before that. In retrospect, I should've used the commit date on the last patch.
As for public mailing lists, most of my patches have been presented as a set on several such (fsdevel, nfs, cachefs and lkml) a couple of times (3rd May, 10th May).
David
Quoted 9 lines · On Wed, 03 Jul 2013 01:12:13 +0100 David Howells <[email protected]> wrote:
Quoted 3 lines · Stephen Rothwell
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.gittags/fscache-20130702/me wonders where this has been hiding for the last month and a half ...
I asked you to pull my fscache branch on the 23rd May, and you replied on the 27th May saying you'd done so.
And in linux-next, I keep fetching the same branch every day to get updates. It is polite (in fact necessary) for you to keep that branch up to date if you change things. You did not update that branch until today which is what confused me. The *commits* you sent Linus have never been in linux-next even though the *patches* have.
Not a biggie, just makes it a bit hard to keep track.
Signature · 2 lines
Cheers, Stephen Rothwell [email protected]