summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix/pvfs_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/ntvfs/posix/pvfs_util.c')
-rw-r--r--source4/ntvfs/posix/pvfs_util.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source4/ntvfs/posix/pvfs_util.c b/source4/ntvfs/posix/pvfs_util.c
index d716834fed..f286dfdc48 100644
--- a/source4/ntvfs/posix/pvfs_util.c
+++ b/source4/ntvfs/posix/pvfs_util.c
@@ -198,7 +198,6 @@ uint32_t pvfs_name_hash(const char *key, size_t length)
*/
uint64_t pvfs_round_alloc_size(struct pvfs_state *pvfs, uint64_t size)
{
- const uint64_t round_value = 511;
- if (size == 0) return 0;
- return (size + round_value) & ~round_value;
+ const uint32_t round_value = pvfs->alloc_size_rounding;
+ return round_value * ((size + round_value - 1)/round_value);
}