afs: Add afs_WriteDCache sanity checks
authorAndrew Deason <adeason@sinenomine.net>
Wed, 21 Dec 2011 22:01:16 +0000 (17:01 -0500)
committerDerrick Brashear <shadow@dementix.org>
Tue, 27 Dec 2011 04:34:06 +0000 (20:34 -0800)
commit79f69f2eb130c1c5cb6cdfa4e7a129f450a58339
treea1e30022c5a7513f4bb9e7d81f639bb7287c0dd3
parent9ed26da26f4a5a3fef3bf0a7b6f9dae751ce6659
afs: Add afs_WriteDCache sanity checks

Writing a non-free non-discarded dcache entry with a zero volume id
can easily cause hash table corruption later on, so make sure we don't
do that. Also log something if the write itself fails, as this usually
indicates an unusual situation involving I/O errors or something.

Change-Id: Ib9602227e8cee324cb63a4a3dee28e53af69b446
Reviewed-on: http://gerrit.openafs.org/6419
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
src/afs/afs_dcache.c