afs: Fix over zealous "vnode modified" warnings
authorDavid Howells <dhowells@redhat.com>
Wed, 19 Jun 2019 09:56:03 +0000 (10:56 +0100)
committerDavid Howells <dhowells@redhat.com>
Thu, 20 Jun 2019 15:49:34 +0000 (16:49 +0100)
commit3647e42b55dcbf3b93457eb750660676e8df5010
tree765067b57f5dbd4dfbe5b312ae7ee2b3abb0434e
parenta188339ca5a396acc588e5851ed7e19f66b0ebd9
afs: Fix over zealous "vnode modified" warnings

Occasionally, warnings like this:

vnode modified 2af7 on {10000b:1} [exp 2af2] YFS.FetchStatus(vnode)

are emitted into the kernel log.  This indicates that when we were applying
the updated vnode (file) status retrieved from the server to an inode we
saw that the data version number wasn't what we were expecting (in this
case it's 0x2af7 rather than 0x2af2).

We've usually received a callback from the server prior to this point - or
the callback promise has lapsed - so the warning is merely informative and
the state is to be expected.

Fix this by only emitting the warning if the we still think that we have a
valid callback promise and haven't received a callback.

Also change the format slightly so so that the new data version doesn't
look like part of the text, the like is prefixed with "kAFS: " and the
message is ranked as a warning.

Fixes: 31143d5d515e ("AFS: implement basic file write support")
Reported-by: Ian Wienand <iwienand@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
fs/afs/inode.c