In a small storage environment (brick_root is < 100G) the POSIX xlator does not respects storage.reserve value.
The flag value is set after every 5s basis and so if in that time period the client has generated the data the
posix xlator does not validate storage. reserve spae check allow consuming the brick unless the flag has not
been set by a posixctxres thread.
Solution: Before doing any writev for an external client check the current free storage space with writev buffer
and if it has surpassed the limit return ENOSPC. The priv->write_value flag has been updated during call unlink
and truncate fop also to use the correct value.
In a small storage environment (brick_root is < 100G) the POSIX xlator does not respects storage.reserve value. The flag value is set after every 5s basis and so if in that time period the client has generated the data the posix xlator does not validate storage. reserve spae check allow consuming the brick unless the flag has not been set by a posixctxres thread.
Solution: Before doing any writev for an external client check the current free storage space with writev buffer and if it has surpassed the limit return ENOSPC. The priv->write_value flag has been updated during call unlink and truncate fop also to use the correct value.