Method and device for processing data fragments and deleting garbage files

The embodiment of the invention discloses a method and device for processing data fragments and deleting garbage files. The method for processing the data fragments comprises the steps that in the process that a distributed total order storage system generates total order data fragments, and at least one piece of attribute description information corresponding to the data fragments is obtained, wherein the attribute description information comprises data iterative information; the attribute description information is written in file meta information corresponding to the data fragments; when an instruction for processing at least one target data fragment is received, the data iterative information in the file meta information corresponding to the target data fragments is processed to achieve processing on the target data fragments. According to the technical scheme, the technical effect for processing the target data fragments completely can be achieved without the needs for moving or modifying the data files, the processing mechanism of data fragments in an existing distributed total order storage system is optimized, and the ever-growing convenient and efficient processing demands of people for the data fragments are met.