Skip to contentSkip to conversation

fideduperange.2: fix the discussion of maximum sizes

PATCH In review Darrick J. Wong 3 participants 4 messages Nov 23, 2016

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 fideduperange.2: fix the discussion of maximum sizes

Fix the discussion of the limitations on the dest_count and src_length parameters to the fideduperange ioctl to reflect what's actually in the kernel.

---
 man2/ioctl_fideduperange.2 |   20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)
man2/ioctl_fideduperange.2 +17 -3
index 2112d10..057229d 100644
@@ -95,7 +95,7 @@ struct file_dedupe_range_info {
 .in
 
 Each deduplication operation targets
-.IR length
+.IR src_length
 bytes in file descriptor
 .IR dest_fd
 at offset
@@ -108,8 +108,15 @@ During the call,
 must be open for reading and
 .IR dest_fd
 must be open for writing.
-For any call to this ioctl, there may not be more than 65,536
-requests attached; each request may not exceed 16MiB.
+The combined size of the struct
+.IR file_dedupe_range
+and the struct
+.IR file_dedupe_range_info
+array must not exceed the system page size.
+The maximum size of
+.IR src_length
+is filesystem dependent and is typically 16MiB.
+This limit will be enforced silently by the filesystem.
 By convention, the storage used by
 .IR src_fd
 is mapped into
@@ -144,6 +151,13 @@ is set to indicate the error.
 .SH ERRORS
 Error codes can be one of, but are not limited to, the following:
 .TP
+.B ENOMEM
+The kernel was unable to allocate sufficient memory to perform the
+operation or
+.IR dest_count
+is so large that the input argument description spans more than a single
+page of memory.
+.TP
 .B EBADF
 .IR src_fd
 is not open for reading;

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

Reviewed-by on v2 1/1
#1 lore raw
Quoted 44 lines · Darrick J. Wong

Fix the discussion of the limitations on the dest_count and src_length parameters to the fideduperange ioctl to reflect what's actually in the kernel.

---
 man2/ioctl_fideduperange.2 |   20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)
man2/ioctl_fideduperange.2 +10 -3
index 2112d10..057229d 100644
@@ -95,7 +95,7 @@ struct file_dedupe_range_info {
 .in
 
 Each deduplication operation targets
-.IR length
+.IR src_length
 bytes in file descriptor
 .IR dest_fd
 at offset
@@ -108,8 +108,15 @@ During the call,
 must be open for reading and
 .IR dest_fd
 must be open for writing.
-For any call to this ioctl, there may not be more than 65,536
-requests attached; each request may not exceed 16MiB.
+The combined size of the struct
+.IR file_dedupe_range
+and the struct
+.IR file_dedupe_range_info
+array must not exceed the system page size.
+The maximum size of
+.IR src_length
+is filesystem dependent and is typically 16MiB.
+This limit will be enforced silently by the filesystem.
 By convention, the storage used by
 .IR src_fd
 is mapped into
@@ -144,6 +151,13 @@ is set to indicate the error.
 .SH ERRORS
 Error codes can be one of, but are not limited to, the following:
 .TP

man2/ioctl_fideduperange.2 is set to indicate the error. · line 163

Quoted 10 lines
man2/ioctl_fideduperange.2 +7 -0
+.B ENOMEM
+The kernel was unable to allocate sufficient memory to perform the
+operation or
+.IR dest_count
+is so large that the input argument description spans more than a single
+page of memory.
+.TP
 .B EBADF
 .IR src_fd
 is not open for reading;
Signature · 1 line
Omar
#2 lore raw
Quoted 14 lines · Omar Sandoval
Quoted 13 lines · Darrick J. Wong

Fix the discussion of the limitations on the dest_count and src_length parameters to the fideduperange ioctl to reflect what's actually in the kernel.

---
 man2/ioctl_fideduperange.2 |   20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)
man2/ioctl_fideduperange.2 +0 -0
index 2112d10..057229d 100644

[...]

Quoted 1 line

Thanks Omar!

Cheers,

Michael

Signature · 3 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
#3 lore raw
In reply to Darrick J. Wong
Quoted 3 lines · Darrick J. Wong

Fix the discussion of the limitations on the dest_count and src_length parameters to the fideduperange ioctl to reflect what's actually in the kernel.

Thanks Darrick. Applied.

Cheers,

Michael

Quoted 52 lines
---
 man2/ioctl_fideduperange.2 |   20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)
man2/ioctl_fideduperange.2 +17 -3
index 2112d10..057229d 100644
@@ -95,7 +95,7 @@ struct file_dedupe_range_info {
 .in
 
 Each deduplication operation targets
-.IR length
+.IR src_length
 bytes in file descriptor
 .IR dest_fd
 at offset
@@ -108,8 +108,15 @@ During the call,
 must be open for reading and
 .IR dest_fd
 must be open for writing.
-For any call to this ioctl, there may not be more than 65,536
-requests attached; each request may not exceed 16MiB.
+The combined size of the struct
+.IR file_dedupe_range
+and the struct
+.IR file_dedupe_range_info
+array must not exceed the system page size.
+The maximum size of
+.IR src_length
+is filesystem dependent and is typically 16MiB.
+This limit will be enforced silently by the filesystem.
 By convention, the storage used by
 .IR src_fd
 is mapped into
@@ -144,6 +151,13 @@ is set to indicate the error.
 .SH ERRORS
 Error codes can be one of, but are not limited to, the following:
 .TP
+.B ENOMEM
+The kernel was unable to allocate sufficient memory to perform the
+operation or
+.IR dest_count
+is so large that the input argument description spans more than a single
+page of memory.
+.TP
 .B EBADF
 .IR src_fd
 is not open for reading;

.

Signature · 7 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html