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
5b6d40e2
Commit
5b6d40e2
authored
5 years ago
by
Kent Overstreet
Committed by
Kent Overstreet
1 year ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: Export correct blocksize to vfs
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
a99b1caf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
fs/bcachefs/fs.c
fs/bcachefs/fs.c
+8
-8
No files found.
fs/bcachefs/fs.c
View file @
5b6d40e2
...
@@ -1147,7 +1147,8 @@ static int bch2_tmpfile(struct mnt_idmap *idmap,
...
@@ -1147,7 +1147,8 @@ static int bch2_tmpfile(struct mnt_idmap *idmap,
return
finish_open_simple
(
file
,
0
);
return
finish_open_simple
(
file
,
0
);
}
}
static
int
bch2_fill_extent
(
struct
fiemap_extent_info
*
info
,
static
int
bch2_fill_extent
(
struct
bch_fs
*
c
,
struct
fiemap_extent_info
*
info
,
struct
bkey_s_c
k
,
unsigned
flags
)
struct
bkey_s_c
k
,
unsigned
flags
)
{
{
if
(
bkey_extent_is_data
(
k
.
k
))
{
if
(
bkey_extent_is_data
(
k
.
k
))
{
...
@@ -1165,8 +1166,8 @@ static int bch2_fill_extent(struct fiemap_extent_info *info,
...
@@ -1165,8 +1166,8 @@ static int bch2_fill_extent(struct fiemap_extent_info *info,
else
else
offset
+=
p
.
crc
.
offset
;
offset
+=
p
.
crc
.
offset
;
if
((
offset
&
(
PAGE_SECTORS
-
1
))
||
if
((
offset
&
(
c
->
opts
.
block_size
-
1
))
||
(
k
.
k
->
size
&
(
PAGE_SECTORS
-
1
)))
(
k
.
k
->
size
&
(
c
->
opts
.
block_size
-
1
)))
flags2
|=
FIEMAP_EXTENT_NOT_ALIGNED
;
flags2
|=
FIEMAP_EXTENT_NOT_ALIGNED
;
ret
=
fiemap_fill_next_extent
(
info
,
ret
=
fiemap_fill_next_extent
(
info
,
...
@@ -1223,7 +1224,7 @@ static int bch2_fiemap(struct inode *vinode, struct fiemap_extent_info *info,
...
@@ -1223,7 +1224,7 @@ static int bch2_fiemap(struct inode *vinode, struct fiemap_extent_info *info,
if
(
bkey_extent_is_data
(
k
.
k
)
||
if
(
bkey_extent_is_data
(
k
.
k
)
||
k
.
k
->
type
==
KEY_TYPE_reservation
)
{
k
.
k
->
type
==
KEY_TYPE_reservation
)
{
if
(
have_extent
)
{
if
(
have_extent
)
{
ret
=
bch2_fill_extent
(
info
,
ret
=
bch2_fill_extent
(
c
,
info
,
bkey_i_to_s_c
(
&
prev
.
k
),
0
);
bkey_i_to_s_c
(
&
prev
.
k
),
0
);
if
(
ret
)
if
(
ret
)
break
;
break
;
...
@@ -1235,7 +1236,7 @@ static int bch2_fiemap(struct inode *vinode, struct fiemap_extent_info *info,
...
@@ -1235,7 +1236,7 @@ static int bch2_fiemap(struct inode *vinode, struct fiemap_extent_info *info,
}
}
if
(
!
ret
&&
have_extent
)
if
(
!
ret
&&
have_extent
)
ret
=
bch2_fill_extent
(
info
,
bkey_i_to_s_c
(
&
prev
.
k
),
ret
=
bch2_fill_extent
(
c
,
info
,
bkey_i_to_s_c
(
&
prev
.
k
),
FIEMAP_EXTENT_LAST
);
FIEMAP_EXTENT_LAST
);
ret
=
bch2_trans_exit
(
&
trans
)
?:
ret
;
ret
=
bch2_trans_exit
(
&
trans
)
?:
ret
;
...
@@ -1803,9 +1804,8 @@ static struct dentry *bch2_mount(struct file_system_type *fs_type,
...
@@ -1803,9 +1804,8 @@ static struct dentry *bch2_mount(struct file_system_type *fs_type,
goto
out
;
goto
out
;
}
}
/* XXX: blocksize */
sb
->
s_blocksize
=
block_bytes
(
c
);
sb
->
s_blocksize
=
PAGE_SIZE
;
sb
->
s_blocksize_bits
=
ilog2
(
block_bytes
(
c
));
sb
->
s_blocksize_bits
=
PAGE_SHIFT
;
sb
->
s_maxbytes
=
MAX_LFS_FILESIZE
;
sb
->
s_maxbytes
=
MAX_LFS_FILESIZE
;
sb
->
s_op
=
&
bch_super_operations
;
sb
->
s_op
=
&
bch_super_operations
;
sb
->
s_export_op
=
&
bch_export_ops
;
sb
->
s_export_op
=
&
bch_export_ops
;
...
...
This diff is collapsed.
Click to expand it.
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