diff options
author | Raghavendra G <rgowdapp@redhat.com> | 2013-10-04 13:37:38 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2013-11-26 10:26:26 -0800 |
commit | 3f1ebe0298450cb8770a8753fe3a8a2519f78911 (patch) | |
tree | 9629ebb1fda8614032a3f00e0377f2ab92ea106f /xlators/cluster | |
parent | 0d5cd92f51c02b8d664000b5a2d22a2ddbbc23b6 (diff) |
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 <rgowdapp@redhat.com>
Reviewed-on: http://review.gluster.org/6035
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/cluster')
0 files changed, 0 insertions, 0 deletions