remarkable-linux/fs/btrfs
Liu Bo 75e7cb7fe0 Btrfs: Per file/directory controls for COW and compression
Data compression and data cow are controlled across the entire FS by mount
options right now.  ioctls are needed to set this on a per file or per
directory basis.  This has been proposed previously, but VFS developers
wanted us to use generic ioctls rather than btrfs-specific ones.

According to Chris's comment, there should be just one true compression
method(probably LZO) stored in the super.  However, before this, we would
wait for that one method is stable enough to be adopted into the super.
So I list it as a long term goal, and just store it in ram today.

After applying this patch, we can use the generic "FS_IOC_SETFLAGS" ioctl to
control file and directory's datacow and compression attribute.

NOTE:
 - The compression type is selected by such rules:
   If we mount btrfs with compress options, ie, zlib/lzo, the type is it.
   Otherwise, we'll use the default compress type (zlib today).

v1->v2:
- rebase to the latest btrfs.
v2->v3:
- fix a problem, i.e. when a file is set NOCOW via mount option, then this NOCOW
  will be screwed by inheritance from parent directory.

Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2011-03-28 05:37:41 -04:00
..
acl.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable 2011-02-07 14:06:18 -08:00
async-thread.c Btrfs: don't walk around with task->state != TASK_RUNNING 2010-05-25 10:34:58 -04:00
async-thread.h Btrfs: fix deadlock on async thread startup 2009-10-05 09:44:45 -04:00
btrfs_inode.h Btrfs: change reserved_extents to an atomic_t 2011-03-17 14:21:18 -04:00
compat.h
compression.c btrfs: Drop __exit attribute on btrfs_exit_compress 2011-02-06 07:19:19 -05:00
compression.h btrfs: Extract duplicate decompress code 2010-12-22 23:15:50 +08:00
ctree.c Btrfs: check return value of read_tree_block() 2011-03-28 05:37:37 -04:00
ctree.h Btrfs: Per file/directory controls for COW and compression 2011-03-28 05:37:41 -04:00
delayed-ref.c Btrfs: add initial tracepoint support for btrfs 2011-03-28 05:37:33 -04:00
delayed-ref.h Btrfs: Integrate metadata reservation with start_transaction 2010-05-25 10:34:50 -04:00
dir-item.c Btrfs: add checks to verify dir items are correct 2011-03-17 14:21:41 -04:00
disk-io.c Btrfs: Per file/directory controls for COW and compression 2011-03-28 05:37:41 -04:00
disk-io.h Btrfs: forced readonly mounts on errors 2011-01-17 15:13:08 -05:00
export.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable 2011-02-07 14:06:18 -08:00
export.h
extent-tree.c btrfs: use GFP_NOFS instead of GFP_KERNEL 2011-03-28 05:37:39 -04:00
extent_io.c Btrfs: add initial tracepoint support for btrfs 2011-03-28 05:37:33 -04:00
extent_io.h Btrfs: check items for correctness as we search 2011-03-17 14:21:37 -04:00
extent_map.c Btrfs: check return value of alloc_extent_map() 2011-02-14 16:21:37 -05:00
extent_map.h btrfs: Allow to add new compression algorithm 2010-12-22 23:15:45 +08:00
file-item.c Btrfs: cleanup some BUG_ON() 2011-03-28 05:37:35 -04:00
file.c Btrfs: add initial tracepoint support for btrfs 2011-03-28 05:37:33 -04:00
free-space-cache.c Btrfs: cleanup how we setup free space clusters 2011-03-25 19:08:08 -04:00
free-space-cache.h Btrfs: load free space cache if it exists 2010-10-29 09:26:35 -04:00
hash.h Btrfs: remove crc32c.h and use libcrc32c directly. 2009-06-10 11:29:53 -04:00
inode-item.c Btrfs: Integrate metadata reservation with start_transaction 2010-05-25 10:34:50 -04:00
inode-map.c Btrfs: cleanup some BUG_ON() 2011-03-28 05:37:35 -04:00
inode.c Btrfs: Per file/directory controls for COW and compression 2011-03-28 05:37:41 -04:00
ioctl.c Btrfs: Per file/directory controls for COW and compression 2011-03-28 05:37:41 -04:00
ioctl.h Merge branch 'lzo-support' of git://repo.or.cz/linux-btrfs-devel into btrfs-38 2011-01-16 11:25:54 -05:00
Kconfig btrfs: Add lzo compression support 2010-12-22 23:15:47 +08:00
locking.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
locking.h
lzo.c Btrfs: Avoid accessing unmapped kernel address 2011-02-16 15:37:58 -05:00
Makefile btrfs: Add lzo compression support 2010-12-22 23:15:47 +08:00
ordered-data.c Btrfs: add initial tracepoint support for btrfs 2011-03-28 05:37:33 -04:00
ordered-data.h btrfs: Allow to add new compression algorithm 2010-12-22 23:15:45 +08:00
orphan.c Btrfs: fixup return code for btrfs_del_orphan_item 2010-12-09 13:57:15 -05:00
print-tree.c btrfs: fix missing break in switch phrase 2011-01-28 16:40:37 -05:00
print-tree.h
ref-cache.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ref-cache.h Btrfs: use RB_ROOT to intialize rb_trees instead of setting rb_node to NULL 2010-03-08 16:26:50 -05:00
relocation.c Btrfs: check return value of read_tree_block() 2011-03-28 05:37:37 -04:00
root-tree.c Btrfs: cleanup some BUG_ON() 2011-03-28 05:37:35 -04:00
struct-funcs.c
super.c Btrfs: add initial tracepoint support for btrfs 2011-03-28 05:37:33 -04:00
sysfs.c Driver core: Constify struct sysfs_ops in struct kobj_type 2010-03-07 17:04:49 -08:00
transaction.c Btrfs: cleanup some BUG_ON() 2011-03-28 05:37:35 -04:00
transaction.h Btrfs: Add readonly snapshots support 2010-12-23 08:49:17 +08:00
tree-defrag.c Btrfs: cleanup warnings from gcc 4.6 (nonbugs) 2010-10-29 15:14:37 -04:00
tree-log.c Btrfs: cleanup some BUG_ON() 2011-03-28 05:37:35 -04:00
tree-log.h Btrfs: Metadata ENOSPC handling for tree log 2010-05-25 10:34:53 -04:00
version.h
version.sh
volumes.c Btrfs: add initial tracepoint support for btrfs 2011-03-28 05:37:33 -04:00
volumes.h Btrfs: add initial tracepoint support for btrfs 2011-03-28 05:37:33 -04:00
xattr.c Btrfs: add checks to verify dir items are correct 2011-03-17 14:21:41 -04:00
xattr.h btrfs: constify xattr_handler 2010-05-21 18:31:18 -04:00
zlib.c btrfs: Extract duplicate decompress code 2010-12-22 23:15:50 +08:00