mirror of
https://github.com/containers/fuse-overlayfs.git
synced 2025-08-03 18:05:58 -04:00
main: reserve sfs.f_namemax for whiteout prefix
redure the reported sfs.f_namemax by the maximum length that can be added for whiteout files. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
d34833dfb3
commit
4725e0ba66
4
main.c
4
main.c
@ -145,6 +145,7 @@ open_by_handle_at (int mount_fd, struct file_handle *handle, int flags)
|
|||||||
#define PRIVILEGED_OPAQUE_XATTR "trusted.overlay.opaque"
|
#define PRIVILEGED_OPAQUE_XATTR "trusted.overlay.opaque"
|
||||||
#define PRIVILEGED_ORIGIN_XATTR "trusted.overlay.origin"
|
#define PRIVILEGED_ORIGIN_XATTR "trusted.overlay.origin"
|
||||||
#define OPAQUE_WHITEOUT ".wh..wh..opq"
|
#define OPAQUE_WHITEOUT ".wh..wh..opq"
|
||||||
|
#define WHITEOUT_MAX_LEN (sizeof (OPAQUE_WHITEOUT))
|
||||||
|
|
||||||
#if !defined FICLONE && defined __linux__
|
#if !defined FICLONE && defined __linux__
|
||||||
# define FICLONE _IOW (0x94, 9, int)
|
# define FICLONE _IOW (0x94, 9, int)
|
||||||
@ -4440,6 +4441,9 @@ ovl_statfs (fuse_req_t req, fuse_ino_t ino)
|
|||||||
fuse_reply_err (req, errno);
|
fuse_reply_err (req, errno);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sfs.f_namemax -= WHITEOUT_MAX_LEN;
|
||||||
|
|
||||||
fuse_reply_statfs (req, &sfs);
|
fuse_reply_statfs (req, &sfs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user