Method and apparatus for enabling adaptive endianness
First Claim
Patent Images
1. A method for writing a block comprising:
- receiving a request to write a first data block and a second data block;
allocating a first space in a storage pool to store the first data block and a second space in the storage pool to store the second data block in response to the request, wherein the storage pool comprises at least one physical disk;
writing the first data block to the first space;
generating a first block pointer referencing the first data block, wherein the first block pointer comprises a first endianness bit associated with the first data block, and wherein the first block pointer is stored in a first indirect block;
setting the endianness bit for the first data block based on a first host endianness;
writing the second data block to the second space;
generating a second block pointer referencing the second data block, wherein the second block pointer comprises a second endianness bit associated with the second data block, and wherein the second block pointer is stored in the first indirect block; and
setting the endianness bit for the second data block based on a second host endianness, wherein the endianness indicated by the first endianness bit is different from the endianness indicated by the second endianness bit,wherein the first data block, the second data block, and the first indirect block are each located in physically separate locations in the storage pool.
2 Assignments
0 Petitions
Accused Products
Abstract
A method for reading a block, involving receiving a request to obtain the block, wherein the request comprises a block pointer, determining a block endianness by reading an endianness bit, obtaining the block using the block pointer, and byte-swapping data in the block to obtain a byte-swapped block, if a host endianness does not match the block endianness.
55 Citations
18 Claims
-
1. A method for writing a block comprising:
-
receiving a request to write a first data block and a second data block; allocating a first space in a storage pool to store the first data block and a second space in the storage pool to store the second data block in response to the request, wherein the storage pool comprises at least one physical disk; writing the first data block to the first space; generating a first block pointer referencing the first data block, wherein the first block pointer comprises a first endianness bit associated with the first data block, and wherein the first block pointer is stored in a first indirect block; setting the endianness bit for the first data block based on a first host endianness; writing the second data block to the second space; generating a second block pointer referencing the second data block, wherein the second block pointer comprises a second endianness bit associated with the second data block, and wherein the second block pointer is stored in the first indirect block; and setting the endianness bit for the second data block based on a second host endianness, wherein the endianness indicated by the first endianness bit is different from the endianness indicated by the second endianness bit, wherein the first data block, the second data block, and the first indirect block are each located in physically separate locations in the storage pool. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A system, comprising:
-
a storage pool comprising at least one physical disk configured to store a first data block, a second data block, and a first indirect block, wherein the first indirect block comprises a first block pointer referencing the first data block, wherein the first block pointer comprises a first data block checksum, a first endianness bit, and a first data block location, and a second block pointer referencing the second data block, wherein the second block pointer comprises a second data block checksum, a second endianness bit, and a second data block location, wherein the endianness indicated by the first endianness bit associated with the first data block is different from the endianness indicated by the second endianness bit associated with the second data block; and a storage pool allocator configured to store the first data block, the second data block, and the first indirect block, in the storage pool, wherein the first data block, the second data block, and the first indirect block are each located in physically separate locations in the storage pool. - View Dependent Claims (7, 8, 9)
-
-
10. A storage pool comprising a file system, wherein the file system comprises:
-
a plurality of child blocks, wherein the plurality of child blocks comprise a plurality of data blocks, and a plurality of indirect blocks, wherein each indirect block references at least one of the plurality of child blocks; a root block referencing at least one of the plurality of child blocks, wherein the root block comprises a root checksum obtained using at least one of the plurality of child blocks, wherein at least one of the indirect blocks comprises a first block pointer referencing a first child block and a second block pointer referencing a second child block, wherein the first block pointer comprises a first endianness bit associated with the first child block and a first child block checksum and the second block pointer comprises a second endianness bit associated with the second child block and a second child block checksum; wherein the endianness indicated by the first endianness bit associated with the first child block is different from the endianness indicated by the second endianness bit associated with the second child block; and a storage pool allocator configured to store the root block and the plurality of child blocks on at least one physical disk in the storage pool, wherein the first child block, the second child block, and the at least one of the indirect blocks are each located in physically separate locations in the storage pool. - View Dependent Claims (11, 12)
-
-
13. A computer system for writing a block comprising:
-
a processor; a memory; a storage device; and software instructions stored in the memory for enabling the computer system under control of the processor, to; receive a request to write a first data block and a second data block; allocate a first space in a storage pool to store the first data block and a second space in the storage pool to store the second data block in response to the request, wherein the storage pool comprises at least one physical disk; write the first data block to the first space; generate a first block pointer referencing the first data block, wherein the first block pointer comprises a first endianness bit associated with the first data block, and wherein the first block pointer is stored in an indirect block; set the endianness bit for the first data block based on a first host endianness; write the second data block to the second space; generate a second block pointer referencing the second data block, wherein the second block pointer comprises a second endianness bit associated with the second data block, and wherein the second block pointer is stored in the indirect block; and set the endianness bit for the second data block based on a second host endianness, wherein the endianness indicated by the first endianness bit is different from the endianness indicated by the second endianness bit, wherein the first data block, the second data block, and the indirect block are each located in physically separate locations in the storage pool. - View Dependent Claims (14, 15, 16)
-
-
17. A computer readable storage medium for writing a block comprising software instructions to:
-
receive a request to write a first data block and a second data block; allocate a first space in a storage pool to store the first data block and a second space to store the second data block in the storage pool in response to the request, wherein the storage pool comprises at least one physical disk; write the first data block to the first space; generate a first block pointer referencing the first data block, wherein the first block pointer comprises a first endianness bit associated with the first data block, and wherein the first block pointer is stored in an indirect block comprising a plurality of block pointers; set the endianness bit for the first data block based on a first host endianness; write the second data block to the second space; generate a second block pointer referencing the second data block, wherein the second block pointer comprises a second endianness bit associated with the second data block, and wherein the second block pointer is stored in the indirect block; and set the endianness bit for the second data block based on a second host endianness, wherein the endianness indicated by the first endianness bit is different from the endianness indicated by the second endianness bit, wherein the first data block, the second data block, and the indirect block are each located in physically separate locations in the storage pool.
-
-
18. A network system having a plurality of nodes comprising:
-
a storage pool comprising a first data block, a second data block, and an indirect block, wherein the indirect block comprises a first block pointer referencing the first data block and a second block pointer referencing the second data block, wherein the first block pointer comprises a first data block checksum, a first endianness bit, and a first data block location and the second block pointer comprises a second data block checksum, a second endianness bit and a second data block location, wherein the endianness indicated by the first endianness bit is different from the endianness indicated by the second endianness bit; and a storage pool allocator configured to store the data block and the indirect block in at least one physical disk in the storage pool, wherein the storage pool resides on any one of the plurality of nodes, wherein the storage pool allocator resides on any one of the plurality of nodes, wherein the first data block, the second data block, and the indirect block are each located in physically separate locations in the storage pool.
-
Specification