tmp_suning_uos_patched/fs/kernfs
Tejun Heo 4d3773c4bb kernfs: implement kernfs_ops->atomic_write_len
A write to a kernfs_node is buffered through a kernel buffer.  Writes
<= PAGE_SIZE are performed atomically, while larger ones are executed
in PAGE_SIZE chunks.  While this is enough for sysfs, cgroup which is
scheduled to be converted to use kernfs needs a bit more control over
it.

This patch adds kernfs_ops->atomic_write_len.  If not set (zero), the
behavior stays the same.  If set, writes upto the size are executed
atomically and larger writes are rejected with -E2BIG.

A different implementation strategy would be allowing configuring
chunking size while making the original write size available to the
write method; however, such strategy, while being more complicated,
doesn't really buy anything.  If the write implementation has to
handle chunking, the specific chunk size shouldn't matter all that
much.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-07 15:52:48 -08:00
..
dir.c kernfs: allow nodes to be created in the deactivated state 2014-02-07 15:52:48 -08:00
file.c kernfs: implement kernfs_ops->atomic_write_len 2014-02-07 15:52:48 -08:00
inode.c kernfs: s/sysfs/kernfs/ in internal functions and whatever is left 2013-12-11 17:39:20 -08:00
kernfs-internal.h kernfs: remove KERNFS_REMOVED 2014-02-07 15:42:41 -08:00
Makefile sysfs, kernfs: add skeletons for kernfs 2013-11-27 13:28:24 -08:00
mount.c kernfs: implement kernfs_syscall_ops->remount_fs() and ->show_options() 2014-02-07 15:52:48 -08:00
symlink.c kernfs: remove kernfs_addrm_cxt 2014-02-07 15:42:40 -08:00