Whamcloud - gitweb
LU-5393 osd-ldiskfs: read i_size once to protect against race 07/13707/6
authorBruno Faccini <bruno.faccini@intel.com>
Tue, 10 Feb 2015 10:07:11 +0000 (11:07 +0100)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 3 Mar 2015 17:20:36 +0000 (17:20 +0000)
commit2267fc79d94dea3778cb4600027698e0155f1af3
treec38c1fa2c2e8672fa5e4e01d86986d8fbbe39534
parent5641279101af968b88e9929c4b9d79f9bb15a6ac
LU-5393 osd-ldiskfs: read i_size once to protect against race

There have been several occurences of ASSERTION(local_nb[i].rc == 0)
failures in ost_brw_read(), where inode's i_size has changed due to
a racing write/growth beyond EOF. osd_read_prep() must protect
himself against this legal behavior by only reading i_size once.

Also removed m local variable declaration/usage apparently outdated.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I5d931d5254b970e7031363f37114d0bad8b573fa
Reviewed-on: http://review.whamcloud.com/13707
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/osd-ldiskfs/osd_io.c