|author||Raghavendra G <email@example.com>||2013-10-04 13:37:38 +0530|
|committer||Anand Avati <firstname.lastname@example.org>||2013-11-26 10:26:26 -0800|
features/quota: make writes short when the entire write cannot fit into available space.
This patch aims to prevent creation of infinite zero byte sized files due to amount of storage available before exceeding quota limit being less than write sizes. Imagine x bytes of storage is available before we exceed quota limit and quota enforcer is receiving writes of size y and (y > x). In this scenario, if we run a shell script like: # for i in $(seq 1 10); do dd if=/dev/zero of=$i bs=y count=1; done Then, we would end up with 10 zero byte sized files, because we allow only complete writes and all writes will fail because of lack of space. However, creates succeed since a create itself will consume zero bytes. In this pattern of creates and writes, size of volume would never grow and x bytes of space will always be available and we can end up with an infinite number of zero byte sized files. Change-Id: Ice148d6a2207883e41759f7b0be73abaa3198b41 BUG: 1012216 Signed-off-by: Raghavendra G <email@example.com> Reviewed-on: http://review.gluster.org/6035 Tested-by: Gluster Build System <firstname.lastname@example.org> Reviewed-by: Anand Avati <email@example.com>
Diffstat (limited to 'libglusterfs/src/glusterfs.h')
0 files changed, 0 insertions, 0 deletions