Whamcloud - gitweb
LU-11691 lov: Limit layout size to max ea size 71/34171/4
authorPatrick Farrell <pfarrell@whamcloud.com>
Fri, 29 Mar 2019 19:00:53 +0000 (15:00 -0400)
committerOleg Drokin <green@whamcloud.com>
Tue, 30 Apr 2019 03:36:30 +0000 (03:36 +0000)
commitaa72de32ba76943d9c96a962a0eb6b5503fad7a6
tree8e572b19f5d0c4c7b3b1bf4bd046af4408f3b4dc
parent3ec712bd183a859a7bb09280b8a5a1776ec5e2c2
LU-11691 lov: Limit layout size to max ea size

The layout code does not currently prevent the creation of
layouts which (once instantiated) will exceed the maximum
xattr size.

This patch modifies the code which calculates the maximum
allowed stripe count for a component to also evaluate the
full size of new layouts and report a count of zero if the
new layout is too large.  The server will then return
 -E2BIG to the client asking for such a layout.

Unfortunately, it's not practical to test this without
overstriping.  LU-9846 adds tests for this.

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I2ead7702780b2600cf09485e06393ee9bcfb4a1e
Reviewed-on: https://review.whamcloud.com/34171
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/lod/lod_lov.c
lustre/lod/lod_qos.c