# US 2012/0259823 A1 · Partitioning a directory while accessing the directory

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2012/0259823 A1
- Document ID: US20120259823A1
- Status: Published application
- Kind: A1
- Application number: 13/083,065
- Filed: 2011-04-08
- Published: 2012-10-11
- Earliest claimed: 2011-04-08
- Assignees: Symantec Corporation
- Inventors: Anindya Banerjee; Maneesh Pusalkar
- Web page: https://patentgrep.com/patent/US20120259823A1

## CPC

- G06F 16/13: File access structures, e.g. distributed indices (arrangements of input from, or output to, record carriers G06F3/06)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A process for reading entries in a directory is initiated. A first index is maintained to indicate how far the read has progressed in the directory. If, during execution of the process, the directory is partitioned into subdirectories, then a second index is maintained for each of the subdirectories to indicate how far the read has progressed in each of the subdirectories. A third index that indicates how far the read has progressed in the partitioned directory is also maintained.

## Claims

### Claim 1

A non-transitory computer-readable storage medium having computer-executable instructions for causing a computer system to perform a method comprising:
initiating a process comprising a read of entries in a directory;
maintaining a first index to indicate how far said read has progressed in said directory;
if, during execution of said process, said directory is partitioned to create a partitioned directory comprising a plurality of subdirectories, then maintaining a second index for each of said subdirectories to indicate how far said read has progressed in each of said subdirectories; and
maintaining a third index that indicates how far said read has progressed in said partitioned directory.

### Claim 2 (depends on 1)

The computer-readable storage medium of claim 1 wherein said process is for producing a listing of said entries.

### Claim 3 (depends on 2)

The computer-readable storage medium of claim 2 wherein said process comprises a readdir operation and wherein said listing comprises file names in said directory.

### Claim 4 (depends on 1)

The computer-readable storage medium of claim 1 wherein said process is associated with a first thread that is executing in parallel with a second thread, wherein said second index and said third index are specific to said first thread.

### Claim 5 (depends on 1)

The computer-readable storage medium of claim 1 wherein entries in said subdirectories are each read only once during execution of said process.

### Claim 6 (depends on 1)

The computer-readable storage medium of claim 1 wherein entries in a subdirectory are read serially, and wherein said subdirectories are read sequentially.

### Claim 7 (depends on 1)

The computer-readable storage medium of claim 1 wherein said method further comprises clearing values for said first, second, and third indices after said process is completed across all of said subdirectories.

### Claim 8

A computer system comprising:
a processor; and
memory coupled to said processor and having stored therein instructions that, if executed by said computer system, cause said computer system to execute a method comprising:
reading a subset of a plurality of entries in a directory to generate a listing of said plurality of entries;
setting a first index to indicate said subset has been read;
before all entries in said directory have been read, partitioning said directory to form a partitioned directory comprising a plurality of subdirectories;
for each of said subdirectories, setting a second index to indicate which entries in said subdirectories have been read; and
setting a third index to indicate how far said read has progressed in said partitioned directory.

### Claim 9 (depends on 8)

The computer system of claim 8 wherein said reading comprises a readdir operation and wherein said listing comprises file names in said directory.

### Claim 10 (depends on 8)

The computer system of claim 8 wherein said reading is associated with a first thread that is executing in parallel with a second thread, wherein said second index and said third index are specific to said first thread.

### Claim 11 (depends on 8)

The computer system of claim 8 wherein entries in said subdirectories are each read only once during said reading.

### Claim 12 (depends on 8)

The computer system of claim 8 wherein entries in a subdirectory are read serially, and wherein said subdirectories are read sequentially.

### Claim 13 (depends on 8)

The computer system of claim 8 wherein said method further comprises clearing values for said first, second, and third indices after said reading is completed across all of said subdirectories.

### Claim 14

A non-transitory computer-readable storage medium having computer-executable components comprising:
an operating system; and
a file system coupled to said operating system, said file system comprising a directory comprising a plurality of entries;
wherein in response to a call issued by said operating system as part of a read operation, said file system returns a number of said entries to said operating system and maintains a first index to indicate entries that have been returned to said operating system;
wherein further if, during execution of said read operation, said directory is partitioned into a partitioned directory comprising a plurality of subdirectories, then said file system maintains: i) a second index for each of said subdirectories to indicate entries in said subdirectories that have been returned to said operating system, and ii) a third index that indicates how far said read operation has progressed in said partitioned directory.

### Claim 15 (depends on 14)

The computer-readable storage medium of claim 14 wherein said read operation is for producing a listing of said entries.

### Claim 16 (depends on 15)

The computer-readable storage medium of claim 15 wherein said read operation comprises a readdir operation and wherein said listing comprises file names in said directory.

### Claim 17 (depends on 14)

The computer-readable storage medium of claim 14 wherein said read operation is associated with a first thread that is executing in parallel with a second thread, wherein said second index and said third index are specific to said first thread.

### Claim 18 (depends on 14)

The computer-readable storage medium of claim 14 wherein entries in a subdirectory are read serially, and wherein said subdirectories are read sequentially.

### Claim 19 (depends on 14)

The computer-readable storage medium of claim 14 wherein values for said first, second, and third indices are stored in an inode structure associated with said directory.

### Claim 20 (depends on 14)

The computer-readable storage medium of claim 14 wherein offset values associated with said second and third indices are returned to said operating system by said file system.
