Whamcloud - gitweb
LU-80 mds: use md_size supplied by client, repack reply
authorMikhail Pershin <tappro@whamcloud.com>
Thu, 29 Mar 2012 13:07:42 +0000 (21:07 +0800)
committerOleg Drokin <green@whamcloud.com>
Mon, 30 Apr 2012 00:30:27 +0000 (20:30 -0400)
commit4fd92d576124fd7772c9f718b83eb67f500e5cec
tree6693c2f91e618e6a9ae5519ca3d81a6f55411dd9
parentf176db6b88f2e932d1cf7e018e42f9a995301e76
LU-80 mds: use md_size supplied by client, repack reply

- mdt uses only client easize to pack reply buffer with the same
buffer sizes as client has.
- introduce reply growing, when packing reply the proper MD size
might be unknown so clients data is being used, but after request
processing the proper size may be bigger than client expects and
reply buffer must be re-packed.
- if server data doesn't fit in buffer then it allocates bigger
buffer instead of using reply message buffer.
- rename mdt_shrink_reply into mdt_fix_reply. It does shrink and/or
grow when needed. Upon growing the bigger MD is copied into new
reply.
- server unpacks ea attr size always in mdt_reint_record for all
operation, so it is available always in rr_eadatasize.

Port from: ORI-80
Author: Mikhail Pershin <tappro@whamcloud.com>

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: Ieae6a1d4d07fdf7643ca6900d02d0dd962a07f6c
Reviewed-on: http://review.whamcloud.com/1808
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
14 files changed:
lustre/include/lustre_req_layout.h
lustre/include/md_object.h
lustre/mdc/mdc_lib.c
lustre/mdd/mdd_dir.c
lustre/mdd/mdd_internal.h
lustre/mdd/mdd_lov.c
lustre/mdd/mdd_object.c
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_internal.h
lustre/mdt/mdt_lib.c
lustre/mdt/mdt_open.c
lustre/mdt/mdt_reint.c
lustre/mdt/mdt_xattr.c
lustre/ptlrpc/layout.c