fcgboy
驱动牛犊
驱动牛犊
  • 注册日期2007-08-22
  • 最后登录2016-01-09
  • 粉丝0
  • 关注0
  • 积分18分
  • 威望113点
  • 贡献值0点
  • 好评度23点
  • 原创分0分
  • 专家分0分
阅读:2198回复:2

fcb和scb的区别?

楼主#
更多 发布于:2008-08-24 22:21
我的理解是:在ntfs下只有scb的概念,在fat下只有fcb的概念.所以fcb=scb.请大家帮忙解释下
michaelgz
论坛版主
论坛版主
  • 注册日期2005-01-26
  • 最后登录2012-10-22
  • 粉丝1
  • 关注1
  • 积分150分
  • 威望1524点
  • 贡献值1点
  • 好评度213点
  • 原创分0分
  • 专家分2分
沙发#
发布于:2008-08-25 22:18
scb and fcb are basically the same thing.
hongpengtao
驱动小牛
驱动小牛
  • 注册日期2006-03-16
  • 最后登录2015-06-03
  • 粉丝0
  • 关注0
  • 积分14分
  • 威望190点
  • 贡献值0点
  • 好评度104点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2010-06-01 10:10
A file stream is a sequence of bytes used to hold file data. Usually a file has only one file stream, namely the file's default data stream. However, on file systems that support multiple data streams, each file can have multiple file streams. One of these is the default data stream, which is unnamed. The others are named alternate data streams. When you open a file, you are actually opening a stream of the given file.

When a file system opens a file stream for the first time, it creates a file-system-specific stream context structure, such as a file control block (FCB) or stream control block (SCB), and stores the address of this structure in the FsContext member of the resulting file object.

For local file systems, if the already opened file stream is opened again (for shared read access, for example), the I/O subsystem creates another file object, but the file system does not create a new stream context. Both file objects receive the address of the same stream context structure. Thus, for local file systems, the stream context pointer uniquely identifies a file stream.

For network file systems that support per-stream contexts, if the already opened file stream is opened again using the same network share name or IP address, the behavior is the same as for local file systems. The I/O subsystem creates a new file object, but the file system does not create a new stream context. Instead, it assigns the same FsContext pointer value to both file objects. However, if the file stream is opened using a different path (for example, a different share name, or an IP address for a file previously opened using a share name), the file system does create a new stream context. Thus, for network file systems that support per-stream contexts, the FsContext pointer does not uniquely identify a file stream.

游客

返回顶部