Browse Prior Art Database

A method with file instance based lookup cache for file-systems

IP.com Disclosure Number: IPCOM000236375D
Publication Date: 2014-Apr-23
Document File: 7 page(s) / 69K

Publishing Venue

The IP.com Prior Art Database

Abstract

A method for file instance based lookup cache for file-systems

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 31% of the total text.

Page 01 of 7

A method with file instance based lookup cache for file -systems Authors: Vidya Ranganathan , Thirumal Venkat

What is CIFS, SMB 2.0


The Server Message Block (SMB) Protocol is a network file sharing protocol, and as implemented in Microsoft Windows is known as Microsoft SMB Protocol. The set of message packets that defines a particular version of the protocol is called a dialect. The Common Internet File System (CIFS) Protocol is a dialect of SMB. One of those dialects is SMB 2.0.

What is Lookup VNODE operation


The lookup vnode operations is invoked by the logical file system layer of the UNIX file system to find a v-node. it is used by the kernel to convert application-given path names to vnodes that represent them. If the name is found, a pointer to the desired v-node is returned. In our case, the v-node on the local system only exists when there is a file present on the remote system. Hence, we need to query to server to be able to know whether the file is present or not.

Lookup in SMB 2.0


The lookup vnode operation (finding a file in a directory) is performed by the client on the server by sending a SMB2 QUERY_DIRECTORY Request (http://msdn.microsoft.com/en-us/library/cc246551.aspx ) to the server with the directory's open file identifier (FileId), by setting the Flags with SMB2_RETURN_SINGLE_ENTRY and filling up the name to be looked up. If we get a successful response from the server, then the lookup on the client succeeds.

Normally on other file systems we won't open a file identifier to just perform a lookup operation, but as SMB 2.0 mandates it, we will have to open a file and then perform lookup, and finally close it on the server.

File Instance (fid)

The SMB2 FILEID/File Instance/fid is used to represent an open to a file. This is a handle provided to us on a successful open on the server. This is meant to be used for all further operations which are performed after opening a file, including the case where we close the file.

Three requests for each lookup - open, lookup, close


When looking at the lookup vnode operation from the protocol perspective, this needs a open fid of the parent directory to be present so that the a name can be looked up inside it. Thus for a lookup operation (searching a file inside a directory) is performed in three stages


a. Open the file, and get the fid
b. Use this fid, name and send a request to the server, get a response
c. Close the fid.

SMBNODE


As mentioned above v-node is implementation independent, to hold implementation specific information (related to CIFS) we have a corresponding structure defined known as the smbnode structure. There is a 1:1 mapping between vnode and smbnode structures, and they also reference one another. All v-node operations/functions are performed on a vnode, so if we need any more additional information to perform this vnode operation we can use the smbnode to store such information.

Approach #1- Keep the directories open , and its disadvantages


One approach is...