Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
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
linux
Commits
e9906a98
Commit
e9906a98
authored
Dec 14, 2007
by
Chris Mason
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes for loopback files in btrfs
Signed-off-by:
Chris Mason
<
chris.mason@oracle.com
>
parent
6e3b9666
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
fs/btrfs/file.c
fs/btrfs/file.c
+1
-0
fs/btrfs/inode.c
fs/btrfs/inode.c
+13
-2
No files found.
fs/btrfs/file.c
View file @
e9906a98
...
...
@@ -861,6 +861,7 @@ struct file_operations btrfs_file_operations = {
.
llseek
=
generic_file_llseek
,
.
read
=
do_sync_read
,
.
aio_read
=
generic_file_aio_read
,
.
splice_read
=
generic_file_splice_read
,
.
write
=
btrfs_file_write
,
.
mmap
=
btrfs_file_mmap
,
.
open
=
generic_file_open
,
...
...
fs/btrfs/inode.c
View file @
e9906a98
...
...
@@ -1893,8 +1893,19 @@ static void btrfs_truncate(struct inode *inode)
int
btrfs_commit_write
(
struct
file
*
file
,
struct
page
*
page
,
unsigned
from
,
unsigned
to
)
{
return
extent_commit_write
(
&
BTRFS_I
(
page
->
mapping
->
host
)
->
extent_tree
,
page
->
mapping
->
host
,
page
,
from
,
to
);
loff_t
pos
=
((
loff_t
)
page
->
index
<<
PAGE_CACHE_SHIFT
)
+
to
;
struct
inode
*
inode
=
page
->
mapping
->
host
;
btrfs_cow_one_page
(
inode
,
page
,
PAGE_CACHE_SIZE
);
set_page_extent_mapped
(
page
);
set_page_dirty
(
page
);
if
(
pos
>
inode
->
i_size
)
{
i_size_write
(
inode
,
pos
);
mark_inode_dirty
(
inode
);
}
return
0
;
}
static
int
create_subvol
(
struct
btrfs_root
*
root
,
char
*
name
,
int
namelen
)
...
...
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