Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
34088780
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
34088780
编写于
6月 12, 2007
作者:
C
Chris Mason
提交者:
David Woodhouse
6月 12, 2007
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Btrfs: i386 fixes from axboe
Signed-off-by:
N
Chris Mason
<
chris.mason@oracle.com
>
上级
6cbd5570
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
59 addition
and
5 deletion
+59
-5
fs/btrfs/INSTALL
fs/btrfs/INSTALL
+51
-0
fs/btrfs/disk-io.c
fs/btrfs/disk-io.c
+1
-1
fs/btrfs/file.c
fs/btrfs/file.c
+5
-2
fs/btrfs/inode.c
fs/btrfs/inode.c
+1
-2
fs/btrfs/transaction.c
fs/btrfs/transaction.c
+1
-0
未找到文件。
fs/btrfs/INSTALL
0 → 100644
浏览文件 @
34088780
Install Instructions
Btrfs puts snapshots and subvolumes into the root directory of the FS. This
directory can only be changed by btrfsctl right now, and normal filesystem
operations do not work on it. The default subvolume is called 'default',
and you can create files and directories in mount_point/default
Btrfs uses the crypto manager interface in the kernel for file and
metadata checksums. You need to compile the kernel with:
CONFIG_CRYPTO=y
CONFIG_CRYPTO_MANAGER=m
CONFIG_CRYPTO_CRC32C=m
cryptomanager and crc32c can be static as well. Once your kernel is
setup, typing make in the btrfs module sources will build against the
running kernel. When the build is complete:
modprobe crc32c
modprobe cryptomgr
insmod btrfs.ko
The Btrfs utility programs require libuuid to build. This can be found
in the e2fsprogs sources, and is usually available as libuuid or
e2fsprogs-devel from various distros.
Building the utilities is just make ; make install. The programs go
into /usr/local/bin. The commands available are:
mkfs.btrfs: create a filesystem
btrfsctl: control program to create snapshots and subvolumes:
mount /dev/sda2 /mnt
btrfsctl -s new_subvol_name /mnt
btrfsctl -s snapshot_of_default /mnt/default
btrfsctl -s snapshot_of_new_subvol /mnt/new_subvol_name
btrfsctl -s snapshot_of_a_snapshot /mnt/snapshot_of_new_subvol
ls /mnt
default snapshot_of_a_snapshot snapshot_of_new_subvol
new_subvol_name snapshot_of_default
Snapshots and subvolumes cannot be deleted right now, but you can
rm -rf all the files and directories inside them.
btrfsck: do a limited check of the FS extent trees.</li>
debug-tree: print all of the FS metadata in text form. Example:
debug-tree /dev/sda2 >& big_output_file
fs/btrfs/disk-io.c
浏览文件 @
34088780
...
@@ -106,7 +106,7 @@ struct buffer_head *btrfs_find_create_tree_block(struct btrfs_root *root,
...
@@ -106,7 +106,7 @@ struct buffer_head *btrfs_find_create_tree_block(struct btrfs_root *root,
int
err
;
int
err
;
u64
first_block
=
index
<<
(
PAGE_CACHE_SHIFT
-
blockbits
);
u64
first_block
=
index
<<
(
PAGE_CACHE_SHIFT
-
blockbits
);
page
=
grab_cache_page
(
mapping
,
index
);
page
=
find_or_create_page
(
mapping
,
index
,
GFP_NOFS
);
if
(
!
page
)
if
(
!
page
)
return
NULL
;
return
NULL
;
...
...
fs/btrfs/file.c
浏览文件 @
34088780
...
@@ -112,7 +112,7 @@ static int dirty_and_release_pages(struct btrfs_trans_handle *trans,
...
@@ -112,7 +112,7 @@ static int dirty_and_release_pages(struct btrfs_trans_handle *trans,
if
(
buffer_mapped
(
bh
)
&&
bh
->
b_blocknr
==
0
)
{
if
(
buffer_mapped
(
bh
)
&&
bh
->
b_blocknr
==
0
)
{
struct
btrfs_key
key
;
struct
btrfs_key
key
;
struct
btrfs_path
*
path
;
struct
btrfs_path
*
path
;
char
*
ptr
;
char
*
ptr
,
*
kaddr
;
u32
datasize
;
u32
datasize
;
/* create an inline extent, and copy the data in */
/* create an inline extent, and copy the data in */
...
@@ -135,8 +135,11 @@ static int dirty_and_release_pages(struct btrfs_trans_handle *trans,
...
@@ -135,8 +135,11 @@ static int dirty_and_release_pages(struct btrfs_trans_handle *trans,
btrfs_set_file_extent_type
(
ei
,
btrfs_set_file_extent_type
(
ei
,
BTRFS_FILE_EXTENT_INLINE
);
BTRFS_FILE_EXTENT_INLINE
);
ptr
=
btrfs_file_extent_inline_start
(
ei
);
ptr
=
btrfs_file_extent_inline_start
(
ei
);
kaddr
=
kmap_atomic
(
bh
->
b_page
,
KM_USER0
);
btrfs_memcpy
(
root
,
path
->
nodes
[
0
]
->
b_data
,
btrfs_memcpy
(
root
,
path
->
nodes
[
0
]
->
b_data
,
ptr
,
bh
->
b_data
,
offset
+
write_bytes
);
ptr
,
kaddr
+
bh_offset
(
bh
),
offset
+
write_bytes
);
kunmap_atomic
(
kaddr
,
KM_USER0
);
mark_buffer_dirty
(
path
->
nodes
[
0
]);
mark_buffer_dirty
(
path
->
nodes
[
0
]);
btrfs_free_path
(
path
);
btrfs_free_path
(
path
);
}
else
if
(
buffer_mapped
(
bh
))
{
}
else
if
(
buffer_mapped
(
bh
))
{
...
...
fs/btrfs/inode.c
浏览文件 @
34088780
...
@@ -1754,6 +1754,7 @@ static int create_subvol(struct btrfs_root *root, char *name, int namelen)
...
@@ -1754,6 +1754,7 @@ static int create_subvol(struct btrfs_root *root, char *name, int namelen)
BTRFS_I
(
dir
)
->
block_group
,
S_IFDIR
|
0700
);
BTRFS_I
(
dir
)
->
block_group
,
S_IFDIR
|
0700
);
inode
->
i_op
=
&
btrfs_dir_inode_operations
;
inode
->
i_op
=
&
btrfs_dir_inode_operations
;
inode
->
i_fop
=
&
btrfs_dir_file_operations
;
inode
->
i_fop
=
&
btrfs_dir_file_operations
;
new_root
->
inode
=
inode
;
ret
=
btrfs_make_empty_dir
(
trans
,
new_root
,
new_dirid
,
new_dirid
);
ret
=
btrfs_make_empty_dir
(
trans
,
new_root
,
new_dirid
,
new_dirid
);
BUG_ON
(
ret
);
BUG_ON
(
ret
);
...
@@ -1766,8 +1767,6 @@ static int create_subvol(struct btrfs_root *root, char *name, int namelen)
...
@@ -1766,8 +1767,6 @@ static int create_subvol(struct btrfs_root *root, char *name, int namelen)
ret
=
btrfs_commit_transaction
(
trans
,
new_root
);
ret
=
btrfs_commit_transaction
(
trans
,
new_root
);
BUG_ON
(
ret
);
BUG_ON
(
ret
);
iput
(
inode
);
mutex_unlock
(
&
root
->
fs_info
->
fs_mutex
);
mutex_unlock
(
&
root
->
fs_info
->
fs_mutex
);
btrfs_btree_balance_dirty
(
root
);
btrfs_btree_balance_dirty
(
root
);
return
0
;
return
0
;
...
...
fs/btrfs/transaction.c
浏览文件 @
34088780
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
#include <linux/module.h>
#include <linux/module.h>
#include <linux/fs.h>
#include <linux/fs.h>
#include <linux/sched.h>
#include "ctree.h"
#include "ctree.h"
#include "disk-io.h"
#include "disk-io.h"
#include "transaction.h"
#include "transaction.h"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录