diff options
Diffstat (limited to 'source4/ntvfs/posix/pvfs_util.c')
-rw-r--r-- | source4/ntvfs/posix/pvfs_util.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source4/ntvfs/posix/pvfs_util.c b/source4/ntvfs/posix/pvfs_util.c index 9f617d39d4..67dd9d22b3 100644 --- a/source4/ntvfs/posix/pvfs_util.c +++ b/source4/ntvfs/posix/pvfs_util.c @@ -187,3 +187,14 @@ uint32_t pvfs_name_hash(const char *key, size_t length) return value; } + + +/* + file allocation size rounding. This is required to pass ifstest +*/ +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; +} |