Data Accessing Method And Data Accessing Apparatus
First Claim
1. A data accessing method, comprising:
- acquiring a size of a minimum access unit of a storage device;
reading first data to be written into the storage device;
determining whether a size of the first data is equal to an integer multiple of the size of the minimum access unit;
if the size of the first data is equal to an integer multiple of the size of the minimum access unit, storing the first data into the integer multiple of the minimum access unit in alignment; and
otherwise, adding padding data to the first data such that the size of the first data is equal to the integer multiple of the size of the minimum access unit, and storing the first data into the integer multiple of the minimum access unit in alignment.
1 Assignment
0 Petitions
Accused Products
Abstract
A data accessing method and a data accessing apparatus are provided. The method includes acquiring a size of a minimum access unit of a storage device; reading first data to be written into the storage device; determining whether a size of the first data is equal to an integer multiple of the size of the minimum access unit; and if the size of the first data is equal to an integer multiple of the size of the minimum access unit, storing the first data into the integer multiple of the minimum access unit in alignment; otherwise, adding padding data to the first data such that the size of the first data is equal to the integer multiple of the size of the minimum access unit, and storing the first data into the integer multiple of the minimum access unit in alignment.
12 Citations
20 Claims
-
1. A data accessing method, comprising:
-
acquiring a size of a minimum access unit of a storage device; reading first data to be written into the storage device; determining whether a size of the first data is equal to an integer multiple of the size of the minimum access unit; if the size of the first data is equal to an integer multiple of the size of the minimum access unit, storing the first data into the integer multiple of the minimum access unit in alignment; and otherwise, adding padding data to the first data such that the size of the first data is equal to the integer multiple of the size of the minimum access unit, and storing the first data into the integer multiple of the minimum access unit in alignment. - View Dependent Claims (2, 3, 4, 5, 6, 7, 9, 10)
-
-
8. The data accessing method according to claim wherein the step of acquiring a size of a minimum access unit in the storage device comprises:
-
transmitting, to the storage device, a request for acquiring the size of the minimum access unit in the storage device; and receiving, from the storage device, a response for feeding back the size of the minimum access unit in the storage device.
-
-
11. A data accessing apparatus applied to an electronic device that includes a storage device, the data accessing apparatus comprises:
-
a size acquiring unit configured to acquire a size of a minimum access unit in the storage device; a data reading unit configured to read first data to be written into the storage device; a size determining unit configured to determine whether a size of the first data is equal to an integer multiple of the size of the minimum access unit; and a data storing unit configured to; if the size of the first data is equal to an integer multiple of the size of the minimum access unit, store the first data into the integer multiple of the minimum access unit in alignment; and
,otherwise, add padding data to the first data such that the size of the first data is equal to the integer multiple of the size of the minimum access unit, and store the first data into the integer multiple of the minimum access unit in alignment. - View Dependent Claims (16, 17, 18, 19, 20)
-
-
12. The data accessing apparatus according to claim wherein the data storing unit is further configured to:
-
determine a first start address to start storing the first data; determine whether the first start address is a start address of one minimum access unit; if yes, store the first data into the integer multiple of the minimum access unit in alignment by starting from the first start address; and otherwise, shift the first start address to make the shifted first start address become a start address of one minimum access unit, and store the first data into the integer multiple of the minimum access unit in alignment by starting from the shifted first start address.
-
-
13. The data accessing apparatus according to claim further comprising:
-
an idleness determining unit configured to determine whether there is an idle minimum access unit in a first minimumerase unit, wherein one minimumerase unit includes a plurality of minimum access units; a data copying unit configured to copy second data stored in the minimum access unit in the first minimum erase unit to an idle minimum access unit in other minimum erase units, if there is an idle minimum access unit in the first minimum erase unit; and a unit erasing unit configured to erase the first minimum erase unit. - View Dependent Claims (14, 15)
-
Specification