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
0f120eac
Commit
0f120eac
authored
Jul 30, 2021
by
Kent Overstreet
Committed by
Kent Overstreet
Oct 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: Add flags field to bch2_inode_to_text()
Signed-off-by:
Kent Overstreet
<
kent.overstreet@gmail.com
>
parent
0423fb71
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
6 deletions
+19
-6
fs/bcachefs/inode.c
fs/bcachefs/inode.c
+17
-6
fs/bcachefs/inode.h
fs/bcachefs/inode.h
+2
-0
No files found.
fs/bcachefs/inode.c
View file @
0f120eac
...
...
@@ -371,6 +371,22 @@ const char *bch2_inode_invalid(const struct bch_fs *c, struct bkey_s_c k)
return
NULL
;
}
static
void
__bch2_inode_unpacked_to_text
(
struct
printbuf
*
out
,
struct
bch_inode_unpacked
*
inode
)
{
pr_buf
(
out
,
"mode %o flags %x "
,
inode
->
bi_mode
,
inode
->
bi_flags
);
#define x(_name, _bits) \
pr_buf(out, #_name " %llu ", (u64) inode->_name);
BCH_INODE_FIELDS
()
#undef x
}
void
bch2_inode_unpacked_to_text
(
struct
printbuf
*
out
,
struct
bch_inode_unpacked
*
inode
)
{
pr_buf
(
out
,
"inum: %llu "
,
inode
->
bi_inum
);
__bch2_inode_unpacked_to_text
(
out
,
inode
);
}
void
bch2_inode_to_text
(
struct
printbuf
*
out
,
struct
bch_fs
*
c
,
struct
bkey_s_c
k
)
{
...
...
@@ -382,12 +398,7 @@ void bch2_inode_to_text(struct printbuf *out, struct bch_fs *c,
return
;
}
pr_buf
(
out
,
"mode: %o "
,
unpacked
.
bi_mode
);
#define x(_name, _bits) \
pr_buf(out, #_name ": %llu ", (u64) unpacked._name);
BCH_INODE_FIELDS
()
#undef x
__bch2_inode_unpacked_to_text
(
out
,
&
unpacked
);
}
const
char
*
bch2_inode_generation_invalid
(
const
struct
bch_fs
*
c
,
...
...
fs/bcachefs/inode.h
View file @
0f120eac
...
...
@@ -55,6 +55,8 @@ void bch2_inode_pack(struct bch_fs *, struct bkey_inode_buf *,
const
struct
bch_inode_unpacked
*
);
int
bch2_inode_unpack
(
struct
bkey_s_c_inode
,
struct
bch_inode_unpacked
*
);
void
bch2_inode_unpacked_to_text
(
struct
printbuf
*
,
struct
bch_inode_unpacked
*
);
struct
btree_iter
*
bch2_inode_peek
(
struct
btree_trans
*
,
struct
bch_inode_unpacked
*
,
u64
,
unsigned
);
int
bch2_inode_write
(
struct
btree_trans
*
,
struct
btree_iter
*
,
...
...
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