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
71951f35
Commit
71951f35
authored
Mar 27, 2007
by
Chris Mason
Committed by
David Woodhouse
Mar 27, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Btrfs: add generation field to file extent
Signed-off-by:
Chris Mason
<
chris.mason@oracle.com
>
parent
9a6f11ed
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
fs/btrfs/ctree.h
fs/btrfs/ctree.h
+13
-0
fs/btrfs/file-item.c
fs/btrfs/file-item.c
+1
-0
No files found.
fs/btrfs/ctree.h
View file @
71951f35
...
...
@@ -192,6 +192,7 @@ struct btrfs_root_item {
}
__attribute__
((
__packed__
));
struct
btrfs_file_extent_item
{
__le64
generation
;
/*
* disk space consumed by the extent, checksum blocks are included
* in these numbers
...
...
@@ -764,6 +765,18 @@ static inline void btrfs_set_file_extent_disk_blocknr(struct
e
->
disk_blocknr
=
cpu_to_le64
(
val
);
}
static
inline
u64
btrfs_file_extent_generation
(
struct
btrfs_file_extent_item
*
e
)
{
return
le64_to_cpu
(
e
->
generation
);
}
static
inline
void
btrfs_set_file_extent_generation
(
struct
btrfs_file_extent_item
*
e
,
u64
val
)
{
e
->
generation
=
cpu_to_le64
(
val
);
}
static
inline
u64
btrfs_file_extent_disk_num_blocks
(
struct
btrfs_file_extent_item
*
e
)
{
...
...
fs/btrfs/file-item.c
View file @
71951f35
...
...
@@ -32,6 +32,7 @@ int btrfs_alloc_file_extent(struct btrfs_trans_handle *trans,
btrfs_set_file_extent_disk_num_blocks
(
item
,
ins
.
offset
);
btrfs_set_file_extent_offset
(
item
,
0
);
btrfs_set_file_extent_num_blocks
(
item
,
ins
.
offset
);
btrfs_set_file_extent_generation
(
item
,
trans
->
transid
);
mark_buffer_dirty
(
path
.
nodes
[
0
]);
*
result
=
ins
.
objectid
;
btrfs_release_path
(
root
,
&
path
);
...
...
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