Whamcloud - gitweb
LU-911 osd: osd_ldiskfs_read returns short reads
authorMikhail Pershin <tappro@whamcloud.com>
Tue, 6 Mar 2012 08:39:27 +0000 (12:39 +0400)
committerOleg Drokin <green@whamcloud.com>
Mon, 7 May 2012 18:58:59 +0000 (14:58 -0400)
commit81b8dc81c5fe85278656ab12dc84389aed54b244
treea78dac7d0af975f216b5b21775aa19028ea35763
parent7446b87524ba992b96b90a508a51d48d86b90865
LU-911 osd: osd_ldiskfs_read returns short reads

osd_ldiskfs_read returned always the requested size even if short
read occurs hiding possible problems. Now it returns real size.

dt_read() helper returns just the same result and can be used to read
any data.

dt_record_read() must be used only for fixed length records

Fix mdt_getattr_internal() code related to readlink, it always tried
to read link of size + 1, so now we need to take this into account.

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: Ib603c5cbe5b06f3f6a9aef74c52bb78cdbd4c3eb
Reviewed-on: http://review.whamcloud.com/2263
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/dt_object.h
lustre/mdt/mdt_handler.c
lustre/obdclass/dt_object.c
lustre/osd-ldiskfs/osd_io.c