随笔分类 -  Btrfs

关于 Btrfs 中的 RAID1 —— 了解 btrfs 的 raid1
摘要:https://btrfs.wiki.kernel.org/index.php?title=FAQhttps://btrfs.wiki.kernel.org/index.php?title=SysadminGuidehttp://marc.info/?l=linux-btrfs&m=132575546926358&w=2邮件列表里面有个比较有意思的话题: Why does Btrfs allow raid1 with mismatched drives?把里面的讨论和 btrfs wiki 中关于 RAID1 的解释总结了一下: * 创建 mkfs.btrfs -m ra... 阅读全文

posted @ 2012-12-05 13:47 refrag 阅读(3962) 评论(1) 推荐(1)

关于 Btrfs 的一些概念和约定
摘要:https://btrfs.wiki.kernel.org/index.php/Data_Structures https://btrfs.wiki.kernel.org/index.php/File:References.pnghttps://btrfs.wiki.kernel.org/index.php/Treeshttps://btrfs.wiki.kernel.org/index.php/File:Directory-structure.pngBtrfs Terms https://btrfs.wiki.kernel.org/index.php/GlossaryDUP DUP... 阅读全文

posted @ 2012-12-03 11:09 refrag 阅读(1330) 评论(0) 推荐(0)

关于 fstrim,btrfs 和 SSD
摘要:翻了一下 btrfs 的邮件列表,看到一篇关于 fstrim on Btrfs 的讨论。里面讲的很多东西还不明白,先记录下来,以后深入了再回过头来看术语 wear leveling: http://en.wikipedia.org/wiki/Wear_levelling参考 fstrim on BTRFS: http://marc.info/?l=linux-btrfs&m=132509156511214&w=21. 分析了一下 fstrim 和 btrfs fs defrag/balance 的不同,以及 SSD 的一些特点在这些操作下带来的性能影响 Q: From:... 阅读全文

posted @ 2012-11-28 20:33 refrag 阅读(2995) 评论(0) 推荐(0)

btrfs 空闲空间管理(四) fstrim
摘要:源文件 util-linux-<version>/sys-utils/fstrim.c linux/fs/btrfs/ioctl.c linux/fs/btrfs/extent-tree.c linux/fs/btrfs/free-space-cache.c用户态工具 fstrimfstrim 是 util-linux 软件包中提供的工具: discard unused blocks on a mounted filesystem该工具有 3 个选项跟要 discard 的范围有关: -o, --offset offset Byte ... 阅读全文

posted @ 2012-11-27 22:15 refrag 阅读(5216) 评论(0) 推荐(1)

btrfs 空闲空间管理(三) inode map
摘要:源文件 linux/fs/btrfs/inode-map.h linux/fs/btrfs/inode-map.c linux/fs/btrfs/free-space-cache.cinode map 也是基于 free-space-cache 实现的,使用的时候需要开启选项 inode_cache: INODE_MAP_CACHE: mount -o inode_cacheinode map 是属于系统范围的:root->free_ino_ctl,其对应的 objectid 为 BTRFS_FREE_INO_OBJECTID: 118 /* 119 * The inode n... 阅读全文

posted @ 2012-11-27 14:40 refrag 阅读(1713) 评论(0) 推荐(0)

btrfs 空闲空间管理(二) free cluster
摘要:源文件 linux/fs/btrfs/ctree.h linux/fs/btrfs/free-space-cache.c free cluster 是在 free space cache 的基础上实现的。随着分配/释放的进行,一段空闲空间会变得不连续,这种情况下,可能多个碎片化的空间总和比较大,可以将多段空闲空间一起管理,满足大空间分配。数据结构 1 /* 2 * free clusters are used to claim free space in relatively large chunks, 3 * allowing us to do less ... 阅读全文

posted @ 2012-11-27 10:39 refrag 阅读(2328) 评论(0) 推荐(0)

btrfs 空闲空间管理(一) free-space-cache
摘要:源文件: linux/fs/btrfs/free-space-cache.h linux/fs/btrfs/free-space-cache.c linux/fs/btrfs/ctree.hbtrfs 使用 free-space-cache 提供了对空闲空间管理的支持,另外,ino map 也是基于 free-space-cache来实现的。free-space-cache 的两个作用: * 支持 extent/bitmap 两种方式的空闲空间管理,每一个 block group 有自己的空闲空间 * 支持 ino map;这个是文件系统范围的,linux/fs/btrfs... 阅读全文

posted @ 2012-11-26 20:19 refrag 阅读(4282) 评论(1) 推荐(1)

导航