aboutsummaryrefslogtreecommitdiff
path: root/tools/virtiofsd/fuse_lowlevel.c
AgeCommit message (Collapse)AuthorFilesLines
2020-01-23virtiofsd: Trim out compatibility codeDr. David Alan Gilbert1-211/+119
virtiofsd only supports major=7, minor>=31; trim out a lot of old compatibility code. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2020-01-23virtiofsd: Fix common header and define for QEMU buildsDr. David Alan Gilbert1-4/+2
All of the fuse files include config.h and define GNU_SOURCE where we don't have either under our build - remove them. Fixup path to the kernel's fuse.h in the QEMUs world. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2020-01-23virtiofsd: Remove unused enum fuse_buf_copy_flagsXiao Yang1-8/+5
Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2020-01-23virtiofsd: remove unused notify reply supportStefan Hajnoczi1-146/+1
Notify reply support is unused by virtiofsd. The code would need to be updated to validate input buffer sizes. Remove this unused code since changes to it are untestable. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2020-01-23virtiofsd: remove mountpoint dummy argumentStefan Hajnoczi1-1/+1
Classic FUSE file system daemons take a mountpoint argument but virtiofsd exposes a vhost-user UNIX domain socket instead. The mountpoint argument is not used by virtiofsd but the user is still required to pass a dummy argument on the command-line. Remove the mountpoint argument to clean up the command-line. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2020-01-23virtiofsd: Format imported files to qemu styleDr. David Alan Gilbert1-1748/+1890
Mostly using a set like: indent -nut -i 4 -nlp -br -cs -ce --no-space-after-function-call-names file clang-format -style=file -i -- file clang-tidy -fix-errors -checks=readability-braces-around-statements file clang-format -style=file -i -- file With manual cleanups. The .clang-format used is below. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed by: Aleksandar Markovic <amarkovic@wavecomp.com> Language: Cpp AlignAfterOpenBracket: Align AlignConsecutiveAssignments: false # although we like it, it creates churn AlignConsecutiveDeclarations: false AlignEscapedNewlinesLeft: true AlignOperands: true AlignTrailingComments: false # churn AllowAllParametersOfDeclarationOnNextLine: true AllowShortBlocksOnASingleLine: false AllowShortCaseLabelsOnASingleLine: false AllowShortFunctionsOnASingleLine: None AllowShortIfStatementsOnASingleLine: false AllowShortLoopsOnASingleLine: false AlwaysBreakAfterReturnType: None # AlwaysBreakAfterDefinitionReturnType is taken into account AlwaysBreakBeforeMultilineStrings: false BinPackArguments: true BinPackParameters: true BraceWrapping: AfterControlStatement: false AfterEnum: false AfterFunction: true AfterStruct: false AfterUnion: false BeforeElse: false IndentBraces: false BreakBeforeBinaryOperators: None BreakBeforeBraces: Custom BreakBeforeTernaryOperators: false BreakStringLiterals: true ColumnLimit: 80 ContinuationIndentWidth: 4 Cpp11BracedListStyle: false DerivePointerAlignment: false DisableFormat: false ForEachMacros: [ 'CPU_FOREACH', 'CPU_FOREACH_REVERSE', 'CPU_FOREACH_SAFE', 'IOMMU_NOTIFIER_FOREACH', 'QLIST_FOREACH', 'QLIST_FOREACH_ENTRY', 'QLIST_FOREACH_RCU', 'QLIST_FOREACH_SAFE', 'QLIST_FOREACH_SAFE_RCU', 'QSIMPLEQ_FOREACH', 'QSIMPLEQ_FOREACH_SAFE', 'QSLIST_FOREACH', 'QSLIST_FOREACH_SAFE', 'QTAILQ_FOREACH', 'QTAILQ_FOREACH_REVERSE', 'QTAILQ_FOREACH_SAFE', 'QTAILQ_RAW_FOREACH', 'RAMBLOCK_FOREACH' ] IncludeCategories: - Regex: '^"qemu/osdep.h' Priority: -3 - Regex: '^"(block|chardev|crypto|disas|exec|fpu|hw|io|libdecnumber|migration|monitor|net|qapi|qemu|qom|standard-headers|sysemu|ui)/' Priority: -2 - Regex: '^"(elf.h|qemu-common.h|glib-compat.h|qemu-io.h|trace-tcg.h)' Priority: -1 - Regex: '.*' Priority: 1 IncludeIsMainRegex: '$' IndentCaseLabels: false IndentWidth: 4 IndentWrappedFunctionNames: false KeepEmptyLinesAtTheStartOfBlocks: false MacroBlockBegin: '.*_BEGIN$' # only PREC_BEGIN ? MacroBlockEnd: '.*_END$' MaxEmptyLinesToKeep: 2 PointerAlignment: Right ReflowComments: true SortIncludes: true SpaceAfterCStyleCast: false SpaceBeforeAssignmentOperators: true SpaceBeforeParens: ControlStatements SpaceInEmptyParentheses: false SpacesBeforeTrailingComments: 1 SpacesInContainerLiterals: true SpacesInParentheses: false SpacesInSquareBrackets: false Standard: Auto UseTab: Never ... Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2020-01-23virtiofsd: Trim down imported filesDr. David Alan Gilbert1-668/+7
There's a lot of the original fuse code we don't need; trim them down. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> with additional trimming by: Signed-off-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Xiao Yang <yangx.jy@cn.fujitsu.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2020-01-23virtiofsd: Add fuse_lowlevel.cDr. David Alan Gilbert1-0/+3129
fuse_lowlevel is one of the largest files from the library and does most of the work. Add it separately to keep the diff sizes small. Again this is from upstream fuse-3.8.0 Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>