摘要 |
<p>Embodiments of the present invention disclose a method and an apparatus for reading and writing data in a file system, which are applicable to the field of communications technologies. In the embodiments of the present invention, the file system supports file-level redundancy algorithm operations of independent disks; after receiving a file read/write request, the file system determines read/write locations of the data to be read/written in the data strip, sequentially caches the to-be-read/written data information corresponding to at least one data strip, and processes the cached data information of at least one data strip. In this way, after the to-be-read/written data information corresponding to a complete data strip is cached, the data is read/written by using a data strip as a unit, and it is not necessary to write the file read/write request into the LUN virtual block device first and then use the RAID module to access the hard disk drive whenever the file read/write request is received, thereby improving efficiency of reading/writing data.</p> |