Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jacobsa-fuse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
jacobsa-fuse
Commits
11eadaed
Commit
11eadaed
authored
Jun 22, 2015
by
Aaron Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed InitOp.
parent
ef728f8a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
66 deletions
+0
-66
fuseops/convert.go
fuseops/convert.go
+0
-8
fuseops/ops.go
fuseops/ops.go
+0
-58
No files found.
fuseops/convert.go
View file @
11eadaed
...
...
@@ -42,14 +42,6 @@ func Convert(
var
io
internalOp
switch
typed
:=
r
.
(
type
)
{
case
*
bazilfuse
.
InitRequest
:
to
:=
&
InitOp
{
maxReadahead
:
typed
.
MaxReadahead
,
}
io
=
to
co
=
&
to
.
commonOp
case
*
bazilfuse
.
LookupRequest
:
to
:=
&
LookUpInodeOp
{
Parent
:
InodeID
(
typed
.
Header
.
Node
),
...
...
fuseops/ops.go
View file @
11eadaed
...
...
@@ -53,64 +53,6 @@ type Op interface {
Logf
(
format
string
,
v
...
interface
{})
}
////////////////////////////////////////////////////////////////////////
// Setup
////////////////////////////////////////////////////////////////////////
// Sent once when mounting the file system. It must succeed in order for the
// mount to succeed.
type
InitOp
struct
{
commonOp
maxReadahead
uint32
}
func
(
o
*
InitOp
)
toBazilfuseResponse
()
(
bfResp
interface
{})
{
resp
:=
bazilfuse
.
InitResponse
{}
bfResp
=
&
resp
// Ask the Linux kernel for larger write requests.
//
// As of 2015-03-26, the behavior in the kernel is:
//
// * (http://goo.gl/jMKHMZ, http://goo.gl/XTF4ZH) Cap the max write size at
// the maximum of 4096 and init_response->max_write.
//
// * (http://goo.gl/gEIvHZ) If FUSE_BIG_WRITES isn't set, don't return more
// than one page.
//
// * (http://goo.gl/4RLhxZ, http://goo.gl/hi0Cm2) Never write more than
// FUSE_MAX_PAGES_PER_REQ pages (128 KiB on x86).
//
// 4 KiB is crazy small. Ask for significantly more, and take what the kernel
// will give us.
const
maxWrite
=
1
<<
21
resp
.
Flags
|=
bazilfuse
.
InitBigWrites
resp
.
MaxWrite
=
maxWrite
// Ask the Linux kernel for larger read requests.
//
// As of 2015-03-26, the behavior in the kernel is:
//
// * (http://goo.gl/bQ1f1i, http://goo.gl/HwBrR6) Set the local variable
// ra_pages to be init_response->max_readahead divided by the page size.
//
// * (http://goo.gl/gcIsSh, http://goo.gl/LKV2vA) Set
// backing_dev_info::ra_pages to the min of that value and what was sent
// in the request's max_readahead field.
//
// * (http://goo.gl/u2SqzH) Use backing_dev_info::ra_pages when deciding
// how much to read ahead.
//
// * (http://goo.gl/JnhbdL) Don't read ahead at all if that field is zero.
//
// Reading a page at a time is a drag. Ask for as much as the kernel is
// willing to give us.
resp
.
MaxReadahead
=
o
.
maxReadahead
return
}
////////////////////////////////////////////////////////////////////////
// Inodes
////////////////////////////////////////////////////////////////////////
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment