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
c8a894d7
Commit
c8a894d7
authored
Jun 27, 2009
by
Chris Mason
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Btrfs: fix the file clone ioctl for preallocated extents
parent
f597bb19
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
fs/btrfs/ioctl.c
fs/btrfs/ioctl.c
+4
-2
No files found.
fs/btrfs/ioctl.c
View file @
c8a894d7
...
...
@@ -1028,7 +1028,8 @@ static long btrfs_ioctl_clone(struct file *file, unsigned long srcfd,
struct
btrfs_file_extent_item
);
comp
=
btrfs_file_extent_compression
(
leaf
,
extent
);
type
=
btrfs_file_extent_type
(
leaf
,
extent
);
if
(
type
==
BTRFS_FILE_EXTENT_REG
)
{
if
(
type
==
BTRFS_FILE_EXTENT_REG
||
type
==
BTRFS_FILE_EXTENT_PREALLOC
)
{
disko
=
btrfs_file_extent_disk_bytenr
(
leaf
,
extent
);
diskl
=
btrfs_file_extent_disk_num_bytes
(
leaf
,
...
...
@@ -1051,7 +1052,8 @@ static long btrfs_ioctl_clone(struct file *file, unsigned long srcfd,
new_key
.
objectid
=
inode
->
i_ino
;
new_key
.
offset
=
key
.
offset
+
destoff
-
off
;
if
(
type
==
BTRFS_FILE_EXTENT_REG
)
{
if
(
type
==
BTRFS_FILE_EXTENT_REG
||
type
==
BTRFS_FILE_EXTENT_PREALLOC
)
{
ret
=
btrfs_insert_empty_item
(
trans
,
root
,
path
,
&
new_key
,
size
);
if
(
ret
)
...
...
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