Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
409c6118
Commit
409c6118
authored
Apr 22, 2008
by
Chris Mason
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Btrfs: Set nodatasum on the inode when written by a nodatasum mount
Signed-off-by:
Chris Mason
<
chris.mason@oracle.com
>
parent
38b66988
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
fs/btrfs/file.c
fs/btrfs/file.c
+8
-0
No files found.
fs/btrfs/file.c
View file @
409c6118
...
...
@@ -863,6 +863,14 @@ static ssize_t btrfs_file_write(struct file *file, const char __user *buf,
first_index
=
pos
>>
PAGE_CACHE_SHIFT
;
last_index
=
(
pos
+
count
)
>>
PAGE_CACHE_SHIFT
;
/*
* if this is a nodatasum mount, force summing off for the inode
* all the time. That way a later mount with summing on won't
* get confused
*/
if
(
btrfs_test_opt
(
root
,
NODATASUM
))
btrfs_set_flag
(
inode
,
NODATASUM
);
/*
* there are lots of better ways to do this, but this code
* makes sure the first and last page in the file range are
...
...
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