哪些文件系统支持通过拼接的Linux的剪接(2)? [英] Which file systems support splicing via Linux's splice(2)?

查看:192
本文介绍了哪些文件系统支持通过拼接的Linux的剪接(2)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

拼接系统调用的手册页说拼接可能会失败,并设置错误号 EINVAL 如果

The man page for the splice system call says that splice may fail and set errno to EINVAL if:

目标文件系统不支持拼接;既没有描述符的指管;或偏移给予非可查找设备

Target file system doesn't support splicing; neither of the descriptors refers to a pipe; or offset given for non-seekable device

哪个文件系统支持拼接?

Which file systems support splicing?

推荐答案

我原来的答案是部分不正确,这是一个重大的改写。

My original answer was partially incorrect, this is a major rewrite.

在Linux的2.6.30.10及以上,拼接收益 EINVAL 当源或目标文件系统不支持拼接。以下是在文件系统确实支持拼接

In Linux 2.6.30.10 and older, splice returns EINVAL when the source or target filesystem does not support splicing. Here are the filesystems that do support splicing:


  • 在读模式:ADFS,AFFS,AFS,BFS,BTRFS,结尾,ecryptfs,exofs,EXT2,EXT3,EXT4,脂肪,保险丝,HPFS,JFFS2,JFS,MINIX,NFS, NILFS2,NTFS,OCFS2,omfs,qnx4,reiserfs的,SMBFS,SYSV,UBIFS,UDF,UFS。

  • 写模式:exofs,EXT2,EXT3,EXT4,JFS,OCFS2,reiserfs的,UBIFS

  • in read mode: adfs, affs, afs, bfs, btrfs, coda, ecryptfs, exofs, ext2, ext3, ext4, fat, fuse, hpfs, jffs2, jfs, minix, nfs, nilfs2, ntfs, ocfs2, omfs, qnx4, reiserfs, smbfs, sysv, ubifs, udf, ufs.
  • in write mode: exofs, ext2, ext3, ext4, jfs, ocfs2, reiserfs, ubifs.

详细信息如下。支持拼接在 do_splice_to()确定中的文件管的情况下,并在的功能。 在> do_splice_from() 功能管道C#L908到文件的情况下。 .splice_read .splice_write 结构的file_operations 包含完成code>,分别为。为了生产文件系统的上述名单,我grepped FS / * / file.c中 .splice_read .splice_write

Details follow. Support for splicing in determined in the do_splice_to() function in the "file to pipe" case and in the do_splice_from() function in the "pipe to file" case. It is done by checking whether the relevant struct file_operations contains .splice_read or .splice_write, respectively. In order to produce the above lists of filesystems, I've grepped fs/*/file.c for .splice_read and .splice_write.

在Linux 2.6.31,所有的文件系统的支持拼接无论是在开始读,写模式

Starting with Linux 2.6.31, all the filesystems support splicing both in read and write modes.

详细信息如下。当文件系统没有 .splice_read .splice_write 结构的file_operations ,回退功能时: default_file_splice_read default_file_splice_write ,分别为。请参见 do_splice_to() do_splice_from() 了解实现。注: EINVAL 仍可以对文档中列出的其他原因返回

Details follow. When a filesystem does not have .splice_read or .splice_write in its struct file_operations, a fallback function is used: default_file_splice_read and default_file_splice_write, respectively. See do_splice_to() and do_splice_from() for implementations. Note: EINVAL may still be returned for other reasons listed in the documentation.

这篇关于哪些文件系统支持通过拼接的Linux的剪接(2)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆