Method and apparatus for increasing efficiency of data storage in a file system
First Claim
Patent Images
1. A computer implemented method comprising:
- receiving, using a processor, a command to store a file in a file system having an inode, wherein the inode is usable to store metadata associated with the file;
responsive to the file having a size that is greater than a block size of blocks in the file system, storing a plurality of data of the file only in an integer number of blocks, wherein a first remainder data of the file remains after storing, and wherein the first remainder data is less than the block size;
placing the first remainder data directly into the inode;
responsive to a second remainder data of the file still remaining after the first remainder data is placed into the inode, placing the second remainder data into an unused space of a partially used block of the file system, wherein the partially used block also stores data of another file; and
responsive to the partially used block becoming full from storing the second remainder data in the partially used block, removing the partially used block from a list of free shared blocks, wherein, for each free shared block on the list of free shared blocks, the list of free shared blocks contains a block number, a free byte quantity, and a pointer to a next free shared block.
1 Assignment
0 Petitions
Accused Products
Abstract
A method, apparatus, and computer instructions for storing data in a file system. A determination is made as to whether space is available in an inode of the file in the file system. The data is stored into the inode in response to space being available. Additionally, data for a file may be stored in a block that is partially filled with data from another file. Data for a file may be stored using either the inode or by sharing a block. Data also may be stored using both of these mechanisms.
77 Citations
9 Claims
-
1. A computer implemented method comprising:
-
receiving, using a processor, a command to store a file in a file system having an inode, wherein the inode is usable to store metadata associated with the file; responsive to the file having a size that is greater than a block size of blocks in the file system, storing a plurality of data of the file only in an integer number of blocks, wherein a first remainder data of the file remains after storing, and wherein the first remainder data is less than the block size; placing the first remainder data directly into the inode; responsive to a second remainder data of the file still remaining after the first remainder data is placed into the inode, placing the second remainder data into an unused space of a partially used block of the file system, wherein the partially used block also stores data of another file; and responsive to the partially used block becoming full from storing the second remainder data in the partially used block, removing the partially used block from a list of free shared blocks, wherein, for each free shared block on the list of free shared blocks, the list of free shared blocks contains a block number, a free byte quantity, and a pointer to a next free shared block. - View Dependent Claims (2, 3, 4)
-
-
5. A recordable-type computer readable computer readable medium on which is stored a computer program product executable in a data processing system, the computer program product comprising:
-
instructions for receiving a command to store a file in a file system having an inode, wherein the inode is usable to store metadata associated with the file; instructions for, responsive to the file having a size that is greater than a block size of blocks in the file system, storing a plurality of data of the file only in an integer number of blocks, wherein a first remainder data of the file remains after storing, and wherein the first remainder data is less than the block size; instructions for placing the first remainder data directly into the inode; instructions for placing a second remainder data into an unused space of a partially used block of the file system responsive to the second remainder data of the file still remaining after the first remainder data is placed into the inode, wherein the partially used block also stores data of another file; and instructions for removing the partially used block from a list of free shared blocks responsive to the partially used block becoming full from storing the second remainder data in the partially used block, wherein, for each free shared block on the list of free shared blocks, the list of free shared blocks contains a block number, a free byte quantity, and a pointer to a next free shared block. - View Dependent Claims (6, 7)
-
-
8. A data processing system comprising:
-
a bus system; a communications unit connected to the bus system; a memory connected to the bus system, wherein the memory includes a set of instructions; and a processing unit connected to the bus system, wherein the processing unit executes the set of instructions comprising; instructions to receive a command to store a file in a file system having an inode, wherein the inode is usable to store metadata associated with the file; instructions to store data of the file only in an integer number of blocks responsive to the file having a size that is greater than a block size of blocks in the file system, wherein a first remainder data of the file remains after storing, and wherein the first remainder data is less than the block size; instructions to place the first remainder data directly into the inode; instructions to place a second remainder data into an unused space of a partially used block of the file system responsive to the second remainder data of the file still remaining after the first remainder data is placed into the inode, wherein the partially used block also stores data of another file; and instructions to remove the partially used block from a list of free shared blocks responsive to the partially used block becoming full from storing the second remainder data in the partially used block, wherein, for each free shared block on the list of free shared blocks, the list of free shared blocks contains a block number, a free byte quantity, and a pointer to a next free shared block. - View Dependent Claims (9)
-
Specification