Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions document-portal/document-portal-fuse.c
Original file line number Diff line number Diff line change
Expand Up @@ -3036,6 +3036,12 @@ xdp_fuse_statfs (fuse_req_t req,

g_debug ("STATFS %" G_GINT64_MODIFIER "x", ino);

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this deserves a comment as to why this is appropriate, perhaps something like:

Suggested change
/* Free space, etc. don't make much sense for a virtual filesystem,
* so reply with a mostly empty buffer. This is consistent with what libfuse does
* if we don't supply a statfs implementation. */

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(but obviously that comment is misleading if what we do here is not consistent with what libfuse would have done without a statfs implementation!)

if(xdp_domain_is_virtual_type(inode->domain)) {
memset(&buf, 0, sizeof(buf));
fuse_reply_statfs (req, &buf);
return;
}
Comment on lines +3039 to +3043
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please indent consistently with the surrounding code:

Suggested change
if(xdp_domain_is_virtual_type(inode->domain)) {
memset(&buf, 0, sizeof(buf));
fuse_reply_statfs (req, &buf);
return;
}
if (xdp_domain_is_virtual_type (inode->domain))
{
memset (&buf, 0, sizeof (buf));
fuse_reply_statfs (req, &buf);
return;
}


if (!xdp_document_inode_checks (op, req, inode, 0))
return;

Expand Down