Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F160416912
D21287.id60868.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D21287.id60868.diff
View Options
Index: sys/fs/fuse/fuse_vnops.c
===================================================================
--- sys/fs/fuse/fuse_vnops.c
+++ sys/fs/fuse/fuse_vnops.c
@@ -2309,7 +2309,7 @@
*/
fdisp_refresh_vp(&fdi, FUSE_LISTXATTR, vp, td, cred);
list_xattr_in = fdi.indata;
- list_xattr_in->size = linux_list_len + sizeof(*list_xattr_out);
+ list_xattr_in->size = linux_list_len;
attr_str = (char *)fdi.indata + sizeof(*list_xattr_in);
snprintf(attr_str, len, "%s%c", prefix, extattr_namespace_separator);
@@ -2318,7 +2318,6 @@
goto out;
linux_list = fdi.answ;
- linux_list_len = fdi.iosize;
/*
* Retrieve the BSD compatible list values.
Index: tests/sys/fs/fusefs/xattr.cc
===================================================================
--- tests/sys/fs/fusefs/xattr.cc
+++ tests/sys/fs/fusefs/xattr.cc
@@ -358,9 +358,7 @@
SET_OUT_HEADER_LEN(out, listxattr);
}));
- // TODO: fix the expected size after fixing the size calculation bug in
- // fuse_vnop_listextattr. It should be exactly 45.
- expect_listxattr(ino, 53,
+ expect_listxattr(ino, 45,
ReturnImmediate([](auto in __unused, auto& out) {
const char l[] = "user.foo";
strlcpy((char*)out.body.bytes, l,
@@ -384,9 +382,7 @@
SET_OUT_HEADER_LEN(out, listxattr);
}));
- // TODO: fix the expected size after fixing the size calculation bug in
- // fuse_vnop_listextattr. It should be exactly 16000.
- expect_listxattr(ino, 16008,
+ expect_listxattr(ino, 16000,
ReturnImmediate([](auto in __unused, auto& out) {
const char l[16] = "user.foobarbang";
for (int i=0; i < 1000; i++) {
@@ -420,9 +416,7 @@
})
);
- // TODO: fix the expected size after fixing the size calculation bug in
- // fuse_vnop_listextattr.
- expect_listxattr(ino, sizeof(attrs) + 8,
+ expect_listxattr(ino, sizeof(attrs),
ReturnImmediate([&](auto in __unused, auto& out) {
memcpy((void*)out.body.bytes, attrs, sizeof(attrs));
out.header.len = sizeof(fuse_out_header) + sizeof(attrs);
@@ -454,9 +448,7 @@
})
);
- // TODO: fix the expected size after fixing the size calculation bug in
- // fuse_vnop_listextattr.
- expect_listxattr(ino, sizeof(attrs) + 8,
+ expect_listxattr(ino, sizeof(attrs),
ReturnImmediate([&](auto in __unused, auto& out) {
memcpy((void*)out.body.bytes, attrs, sizeof(attrs));
out.header.len = sizeof(fuse_out_header) + sizeof(attrs);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jun 25, 6:57 AM (21 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34309710
Default Alt Text
D21287.id60868.diff (2 KB)
Attached To
Mode
D21287: fusefs: fix list size calculation bug in fuse_vnop_listextattr
Attached
Detach File
Event Timeline
Log In to Comment