research in hard disk IO

提升磁盘IO性能技巧
本文探讨了磁盘IO性能的提升方法,包括利用FastDFS分布式文件系统优化文件存储方式,减少磁盘寻道时间,合理设置缓存机制,以及采用异步IO技术等。

目前磁盘都是机械方式运作的,主要体现在磁盘读写前寻找磁道的过程。磁盘自带的读写缓存大小,对于磁盘读写速度至关重要。读写速度快的磁盘,通常都带有较大的读写缓存。磁盘的寻道过程是机械方式,决定了其随机读写速度将明显低于顺序读写。在我们做系统设计和实现时,需要考虑到磁盘的这一特性。

  FastDFS是一个开源的高效分布式文件系统,它最初的实现,文件是按hash方式随机分布到多个目录中的,后来增加了顺序存放的做法。通过对比测试,发现文件按目录顺序存储,写文件IO效率明显高于按目录随机存储。

  目前磁盘顺序读取的速度并不差,比如普通硬盘的IO可以达到每秒40~60MB,好一些的硬盘可以达到每秒100MB左右。在多进程或多线程并发读取磁盘的情况下,随着并发数的增加,磁盘IO效率将大大下降。主要是因为每次读写,磁道可能存在较大的偏移,磁道寻址时间加大,导致磁盘IO性能急剧下降。对于这种场景,优化方案是尽可能减少并发读写的进程数或线程数。可以用锁的机制,也可以采用专门的磁盘IO线程来对磁盘进行读写。FastDFS 2.x版本,磁盘读写就采用了专门的线程来完成。

  为了充分发挥多块磁盘的效率,不建议使用传统的RAID方式。比较好的做法是每块磁盘单独mount,通过程序来控制对多块磁盘进行并发读写。采用单盘mount,文件的备份和冗余可以通过多台机器实现。

  文件数多了之后,比如达到上千万个文件,当随机访问众多文件时,文件系统的性能会急剧下降。业界流行的做法是将多个小文件合并存储到一个大文件中的方式来降低文件数。FastDFS 3.0支持将多个小文件合并存储到一个较大文件中,目前开发进展比较顺利,预计5月份可以发布3.0版本。

  提升磁盘IO的另外一个技巧,一次尽可能多写入或多读取。也就是说,将程序的读写buffer设置得尽可能大一些。例如日志或者redo log的写入,不是每次调用都直接写磁盘,而是先缓存到内存中,等buffer满了再写入磁盘,也可以定时写入磁盘。

  操作系统和C库函数通常会对写入的文件内容做缓存,以减少实际写文件的次数。直接调用系统函数fsync或C函数fflush将使系统的缓存机制失效,此时将强制把内容刷到磁盘上。除非必需,否则不要执行强制刷盘操作。

  注:如果没有特别说明,文中说的磁盘指的是硬盘。


转:

这几天在研究怎么才能加快windows文件读写速度,搜了很多文章,MSDN也看了不少。稍微给大家分享一下。限制windows文件读写速度的瓶颈其实最终还是来源于我们硬盘的固有特性,磁盘本身的转速和硬盘的串行化工作机制。我们所能做的只是改善软件实现方法去逼近硬盘的极限读写速度。平时我们在拷贝粘贴文件的时候,其实是用的windows本身的实现,其中有一个很大的影响速度的地方就是它们都用了windows的文件缓存机制,当你拷贝一个大文件时,windows会根据你要拷贝的文件大小缓存很大一部分到系统缓存,这时候你会看到系统缓存瞬间飙涨,机器性能大大降低。整体拷贝速度为10M/S左右。而IDE 7200转的硬盘读写速度一般能达到30M/S左右,所以浪费了很大一部分硬盘读写速度。而当我们并行读写多个文件时,速度比串行读写多个文件还要慢,这就是因为硬盘串行工作机制的限制,多文件并行操作时,时间都花在磁头摆动上了。并且在缓存读取上,命中率也将大大降低。所以我们要避免使用windows缓存机制,并尽量不要同时读写多段文件,尽量读写连续的文件块。一般来说,我们操作一个windows I/O句柄用的是windows文件读写系列API:CreateFile, ReadFile, WriteFile等,这些API不仅可以读写文件句柄,所有的I/O设备句柄都能通过这些API来操作。比如socket描述符, 串口描述符,管道描述符等。通过设置他们的参数,我们可以选择以不同的方式操作IO。例如CreateFile,原型如下:HANDLE CreateFile(
LPCTSTR lpFileName, //指向文件名的指针
DWORD dwDesiredAccess, //访问模式(写/读)
DWORD dwShareMode, //共享模式
LPSECURITY_ATTRIBUTES lpSecurityAttributes, //指向安全属性的指针
DWORD dwCreationDisposition, //如何创建
DWORD dwFlagsAndAttributes, //文件属性
HANDLE hTemplateFile //用于复制文件句柄
);

对于读写速度,最重要的是dwFlagsAndAttributes参数,这个参数的取值可以参看MSDN,这里稍微说一下:Attributes:
该参数可以接收下列属性的任意组合.除非其它所有的文件属性忽略FILE_ATTRIBUTE_NORMAL.
FILE_ATTRIBUTE_ARCHIVE 文件将被存档,程序使用此属性来标志文件去备份或移除

FILE_ATTRIBUTE_HIDDEN 文件被隐藏,它不会在一般文件夹列表中被装载.

FILE_ATTRIBUTE_NORMAL 文件没有被设置任何属性.

FILE_ATTRIBUTE_OFFLINE 文件的数据没有被立即用到。指出正在脱机使用该文件。

FILE_ATTRIBUTE_READONLY 这个文件只可读取.程序可以读文件,但不可以在上面写入内容,也不可删除.

FILE_ATTRIBUTE_SYSTEM 文件是系统的一部分,或是系统专用的.

FILE_ATTRIBUTE_TEMPORARY 文件被使用后,文件系统将努力为(文件的)所有数据的迅迅访问保持一块内存。临时文件应当在程序不用时及时删除。


Flags:

可以接受下列标志的任意组合。

FILE_FLAG_WRITE_THROUGH

指示系统通过快速缓存直接写入磁盘,

FILE_FLAG_OVERLAPPED

指示系统初始化对象, 此操作将对进程设置一个引用计数并返回ERROR_IO_PENDING.处理完成后, 指定对象将被设置为信号状态.当你指定FILE_FLAG_OVERLAPPED时,读写文件的函数必须指定一个OVERLAPPED结构.并且. 当FILE_FLAG_OVERLAPPED被指定, 程序必须执行重叠参数(指向OVERLAPPED结构)去进行文件的读写. 这个标志也可以有超过一个操作去执行.


FILE_FLAG_NO_BUFFERING

指示系统不使用快速缓冲区或缓存,当和FILE_FLAG_OVERLAPPED组合,该标志给出最
大的异步操作量, 因为I/O不依赖内存管理器的异步操作.然而,一些I/O操作将会运行得长一些,因为数据没有控制在缓存中.

当使用FILE_FLAG_NO_BUFFERING打开文件进行工作时,程序必须达到下列要求:


1. 文件的存取开头的字节偏移量必须是扇区尺寸的整倍数.
2. 文件存取的字节数必须是扇区尺寸的整倍数.例如,如果扇区尺寸是512字节.程序就可以读或者写512,1024或者2048字节,但不能够是335,981或者7171字节.

3. 进行读和写操作的地址必须在扇区的对齐位置,在内存中对齐的地址是扇区.尺寸的整倍数.一个将缓冲区与扇区尺寸对齐的途径是使用VirtualAlloc函数.它分配与操作系统内存页大小的整倍数对齐的内存地址.因为内存页尺寸和扇区尺寸--2都是它们的幂.这块内存在地址中同样与扇区尺寸大小的整倍数对齐.程序可以通过调用GetDiskFreeSpace来确定扇区的尺寸.



FILE_FLAG_RANDOM_ACCESS
指定文件是随机访问,这个标志可以使系统优化文件的缓冲.

FILE_FLAG_SEQUENTIAL_SCAN 
指定文件将从头到尾连续地访问.这个标志可以提示系统优化文件缓冲. 如果程序在
随机访问文件中移动文件指针,优化可能不会发生;然而,正确的操作仍然可以得到保
证. 指定这个标志可以提高程序以顺序访问模式读取大文件的性能, 性能的提高在许多程序读取一些大的顺序文件时是异常明显的.但是可能会有小范围的字节遗漏.

FILE_FLAG_DELETE_ON_CLOSE

指示系统在文件所有打开的句柄关闭后立即删除文件.不只有你指定了FILE_FLAG_DELETE_ON_CLOSE的文件。
FILE_SHARE_DELETE
如果没有使用FILE_SHARE_DELETE,后续的打开文件的请求将会失败.

FILE_FLAG_BACKUP_SEMANTICS

WINDOWS NT:指示系统为文件的打开或创建执行一个备份或恢复操作. 系统保证调
用进程忽略文件的安全选项,倘若它必须有一个特权.则相关的特权则是SE_BACKUP_NAME和SE_RESTORE_NAME.你也可以使用这个标志获得一个文件夹的句柄,一个文件夹句柄能够象一个文件句柄一样传给某些Win32函数。

FILE_FLAG_POSIX_SEMANTICS

指明文件符合POSIX标准.这是在MS-DOS与16位Windows下的标准.

FILE_FLAG_OPEN_REPARSE_POINT

指定这个标志制约NTFS分区指针.该标志不能够和CREAT_ALWAYS一起使用.

FILE_FLAG_OPEN_NO_RECALL

指明需要文件数据,但是将继续从远程存储器中接收.它不会将数据存放在本地存储器中.这个标志由远程存储系统或等级存储管理器系统使用.


可以看到,有很多标志和属性可以使用,但是这里最重要的对速度影响最大的是红字部分的FILE_FLAG_NO_BUFFERING和FILE_FLAG_OVERLAPPED.


FILE_FLAG_NO_BUFFERING就是说文件操作时不使用windows缓存机制,FILE_FLAG_OVERLAPPED则表示文件的操作将异步进行。就是说不等待I/O操作完成,读写函数便返回,这要用到重叠IO机制,自己针对IO状态做不同的事情,基本上用到的是GetOverlappedResult和WaitForMultiObject。

当我单独使用FILE_FLAG_NO_BUFFERING时,拷贝粘贴一个400M文件大概22秒,接近20M/S的速度,但是指定FILE_FLAG_NO_BUFFERING时,文件位置,缓存大小,文件大小都有很大的限制,即都要和扇区大小对齐(见红字部分)。如果不这样,读写将失败。这的确增大了不少内存分配操作,但是速度提高却很明显。

而当我使用FILE_FLAG_OVERLAPPED将文件分为多个部分同时读写时,发现速度反而慢了。回到开头说的,这就是硬盘本身的限制了。但是我参考Fastcopy(一个免费文件拷贝软件)源代码时,发现它也同时打开了多个文件读写。可是速度却没有慢多少。具体原因还得研究研究。

以上都是在本地硬盘操作的情况下,没有网络的限制,而当我要在服务器上拷贝文件时,最大的瓶颈便成了网络。在这种情况下,我的想法是,服务器的硬盘读取速度应该大大高于我们的机器硬盘,所以可以将文件分多段同时读取,以争取网络带宽,而在写入时则以串行的方式写入连续的文件。这样既能充分利用网络,又能避免本地

 

/*---------------------------------------------------------------------------/ / FatFs - FAT file system module include file R0.09 (C)ChaN, 2011 /----------------------------------------------------------------------------/ / FatFs module is a generic FAT file system module for small embedded systems. / This is a free software that opened for education, research and commercial / developments under license policy of following trems. / / Copyright (C) 2011, ChaN, all right reserved. / / * The FatFs module is a free software and there is NO WARRANTY. / * No restriction on use. You can use, modify and redistribute it for / personal, non-profit or commercial product UNDER YOUR RESPONSIBILITY. / * Redistributions of source code must retain the above copyright notice. / /----------------------------------------------------------------------------*/ #ifndef _FATFS #define _FATFS 6502 /* Revision ID */ #ifdef __cplusplus extern "C" { #endif #include "integer.h" /* Basic integer types */ #include "ffconf.h" /* FatFs configuration options */ #include "HeaderFiles.h" #if _FATFS != _FFCONF #error Wrong configuration file (ffconf.h). #endif /* Definitions of volume management */ #if _MULTI_PARTITION /* Multiple partition configuration */ typedef struct { BYTE pd; /* Physical drive number */ BYTE pt; /* Partition: 0:Auto detect, 1-4:Forced partition) */ } PARTITION; extern PARTITION VolToPart[]; /* Volume - Partition resolution table */ #define LD2PD(vol) (VolToPart[vol].pd) /* Get physical drive number */ #define LD2PT(vol) (VolToPart[vol].pt) /* Get partition index */ #else /* Single partition configuration */ #define LD2PD(vol) (vol) /* Each logical drive is bound to the same physical drive number */ #define LD2PT(vol) 0 /* Always mounts the 1st partition or in SFD */ #endif /* Type of path name strings on FatFs API */ #if _LFN_UNICODE /* Unicode string */ #if !_USE_LFN #error _LFN_UNICODE must be 0 in non-LFN cfg. #endif #ifndef _INC_TCHAR typedef WCHAR TCHAR; #define _T(x) L ## x #define _TEXT(x) L ## x #endif #else /* ANSI/OEM string */ #ifndef _INC_TCHAR typedef char TCHAR; #define _T(x) x #define _TEXT(x) x #endif #endif /* File system object structure (FATFS) */ typedef struct { BYTE fs_type; /* FAT sub-type (0:Not mounted) */ BYTE drv; /* Physical drive number */ BYTE csize; /* Sectors per cluster (1,2,4...128) */ BYTE n_fats; /* Number of FAT copies (1,2) */ BYTE wflag; /* win[] dirty flag (1:must be written back) */ BYTE fsi_flag; /* fsinfo dirty flag (1:must be written back) */ WORD id; /* File system mount ID */ WORD n_rootdir; /* Number of root directory entries (FAT12/16) */ #if _MAX_SS != 512 WORD ssize; /* Bytes per sector (512, 1024, 2048 or 4096) */ #endif #if _FS_REENTRANT _SYNC_t sobj; /* Identifier of sync object */ #endif #if !_FS_READONLY DWORD last_clust; /* Last allocated cluster */ DWORD free_clust; /* Number of free clusters */ DWORD fsi_sector; /* fsinfo sector (FAT32) */ #endif #if _FS_RPATH DWORD cdir; /* Current directory start cluster (0:root) */ #endif DWORD n_fatent; /* Number of FAT entries (= number of clusters + 2) */ DWORD fsize; /* Sectors per FAT */ DWORD fatbase; /* FAT start sector */ DWORD dirbase; /* Root directory start sector (FAT32:Cluster#) */ DWORD database; /* Data start sector */ DWORD winsect; /* Current sector appearing in the win[] */ BYTE win[_MAX_SS]; /* Disk access window for Directory, FAT (and Data on tiny cfg) */ } FATFS; /* File object structure (FIL) */ typedef struct { FATFS* fs; /* Pointer to the owner file system object */ WORD id; /* Owner file system mount ID */ BYTE flag; /* File status flags */ BYTE pad1; DWORD fptr; /* File read/write pointer (0 on file open) */ DWORD fsize; /* File size */ DWORD sclust; /* File start cluster (0 when fsize==0) */ DWORD clust; /* Current cluster */ DWORD dsect; /* Current data sector */ #if !_FS_READONLY DWORD dir_sect; /* Sector containing the directory entry */ BYTE* dir_ptr; /* Ponter to the directory entry in the window */ #endif #if _USE_FASTSEEK DWORD* cltbl; /* Pointer to the cluster link map table (null on file open) */ #endif #if _FS_SHARE UINT lockid; /* File lock ID (index of file semaphore table) */ #endif #if !_FS_TINY BYTE buf[_MAX_SS]; /* File data read/write buffer */ #endif } FIL; /* Directory object structure (DIR) */ typedef struct { FATFS* fs; /* Pointer to the owner file system object */ WORD id; /* Owner file system mount ID */ WORD index; /* Current read/write index number */ DWORD sclust; /* Table start cluster (0:Root dir) */ DWORD clust; /* Current cluster */ DWORD sect; /* Current sector */ BYTE* dir; /* Pointer to the current SFN entry in the win[] */ BYTE* fn; /* Pointer to the SFN (in/out) {file[8],ext[3],status[1]} */ #if _USE_LFN WCHAR* lfn; /* Pointer to the LFN working buffer */ WORD lfn_idx; /* Last matched LFN index number (0xFFFF:No LFN) */ #endif } DIR; /* File status structure (FILINFO) */ typedef struct { DWORD fsize; /* File size */ WORD fdate; /* Last modified date */ WORD ftime; /* Last modified time */ BYTE fattrib; /* Attribute */ TCHAR fname[13]; /* Short file name (8.3 format) */ #if _USE_LFN TCHAR* lfname; /* Pointer to the LFN buffer */ UINT lfsize; /* Size of LFN buffer in TCHAR */ #endif } FILINFO; /* File function return code (FRESULT) */ typedef enum { FR_OK = 0, /* (0) Succeeded */ FR_DISK_ERR, /* (1) A hard error occured in the low level disk I/O layer */ FR_INT_ERR, /* (2) Assertion failed */ FR_NOT_READY, /* (3) The physical drive cannot work */ FR_NO_FILE, /* (4) Could not find the file */ FR_NO_PATH, /* (5) Could not find the path */ FR_INVALID_NAME, /* (6) The path name format is invalid */ FR_DENIED, /* (7) Acces denied due to prohibited access or directory full */ FR_EXIST, /* (8) Acces denied due to prohibited access */ FR_INVALID_OBJECT, /* (9) The file/directory object is invalid */ FR_WRITE_PROTECTED, /* (10) The physical drive is write protected */ FR_INVALID_DRIVE, /* (11) The logical drive number is invalid */ FR_NOT_ENABLED, /* (12) The volume has no work area */ FR_NO_FILESYSTEM, /* (13) There is no valid FAT volume */ FR_MKFS_ABORTED, /* (14) The f_mkfs() aborted due to any parameter error */ FR_TIMEOUT, /* (15) Could not get a grant to access the volume within defined period */ FR_LOCKED, /* (16) The operation is rejected according to the file shareing policy */ FR_NOT_ENOUGH_CORE, /* (17) LFN working buffer could not be allocated */ FR_TOO_MANY_OPEN_FILES, /* (18) Number of open files > _FS_SHARE */ FR_INVALID_PARAMETER /* (19) Given parameter is invalid */ } FRESULT; /*--------------------------------------------------------------*/ /* FatFs module application interface */ FRESULT f_mount (BYTE, FATFS*); /* Mount/Unmount a logical drive */ FRESULT f_open (FIL*, const TCHAR*, BYTE); /* Open or create a file */ FRESULT f_read (FIL*, void*, UINT, UINT*); /* Read data from a file */ FRESULT f_lseek (FIL*, DWORD); /* Move file pointer of a file object */ FRESULT f_close (FIL*); /* Close an open file object */ FRESULT f_opendir (DIR*, const TCHAR*); /* Open an existing directory */ FRESULT f_readdir (DIR*, FILINFO*); /* Read a directory item */ FRESULT f_stat (const TCHAR*, FILINFO*); /* Get file status */ FRESULT f_write (FIL*, const void*, UINT, UINT*); /* Write data to a file */ FRESULT f_getfree (const TCHAR*, DWORD*, FATFS**); /* Get number of free clusters on the drive */ FRESULT f_truncate (FIL*); /* Truncate file */ FRESULT f_sync (FIL*); /* Flush cached data of a writing file */ FRESULT f_unlink (const TCHAR*); /* Delete an existing file or directory */ FRESULT f_mkdir (const TCHAR*); /* Create a new directory */ FRESULT f_chmod (const TCHAR*, BYTE, BYTE); /* Change attriburte of the file/dir */ FRESULT f_utime (const TCHAR*, const FILINFO*); /* Change timestamp of the file/dir */ FRESULT f_rename (const TCHAR*, const TCHAR*); /* Rename/Move a file or directory */ FRESULT f_chdrive (BYTE); /* Change current drive */ FRESULT f_chdir (const TCHAR*); /* Change current directory */ FRESULT f_getcwd (TCHAR*, UINT); /* Get current directory */ FRESULT f_forward (FIL*, UINT(*)(const BYTE*,UINT), UINT, UINT*); /* Forward data to the stream */ FRESULT f_mkfs (BYTE, BYTE, UINT); /* Create a file system on the drive */ FRESULT f_fdisk (BYTE, const DWORD[], void*); /* Divide a physical drive into some partitions */ int f_putc (TCHAR, FIL*); /* Put a character to the file */ int f_puts (const TCHAR*, FIL*); /* Put a string to the file */ int f_printf (FIL*, const TCHAR*, ...); /* Put a formatted string to the file */ TCHAR* f_gets (TCHAR*, int, FIL*); /* Get a string from the file */ #define f_eof(fp) (((fp)->fptr == (fp)->fsize) ? 1 : 0) #define f_error(fp) (((fp)->flag & FA__ERROR) ? 1 : 0) #define f_tell(fp) ((fp)->fptr) #define f_size(fp) ((fp)->fsize) #ifndef EOF #define EOF (-1) #endif /*--------------------------------------------------------------*/ /* Additional user defined functions */ /* RTC function */ #if !_FS_READONLY DWORD get_fattime (void); #endif /* Unicode support functions */ #if _USE_LFN /* Unicode - OEM code conversion */ WCHAR ff_convert (WCHAR, UINT); /* OEM-Unicode bidirectional conversion */ WCHAR ff_wtoupper (WCHAR); /* Unicode upper-case conversion */ #if _USE_LFN == 3 /* Memory functions */ void* ff_memalloc (UINT); /* Allocate memory block */ void ff_memfree (void*); /* Free memory block */ #endif #endif /* Sync functions */ #if _FS_REENTRANT int ff_cre_syncobj (BYTE, _SYNC_t*);/* Create a sync object */ int ff_req_grant (_SYNC_t); /* Lock sync object */ void ff_rel_grant (_SYNC_t); /* Unlock sync object */ int ff_del_syncobj (_SYNC_t); /* Delete a sync object */ #endif /*--------------------------------------------------------------*/ /* Flags and offset address */ /* File access control and file status flags (FIL.flag) */ #define FA_READ 0x01 #define FA_OPEN_EXISTING 0x00 #define FA__ERROR 0x80 #if !_FS_READONLY #define FA_WRITE 0x02 #define FA_CREATE_NEW 0x04 #define FA_CREATE_ALWAYS 0x08 #define FA_OPEN_ALWAYS 0x10 #define FA__WRITTEN 0x20 #define FA__DIRTY 0x40 #endif /* FAT sub type (FATFS.fs_type) */ #define FS_FAT12 1 #define FS_FAT16 2 #define FS_FAT32 3 /* File attribute bits for directory entry */ #define AM_RDO 0x01 /* Read only */ #define AM_HID 0x02 /* Hidden */ #define AM_SYS 0x04 /* System */ #define AM_VOL 0x08 /* Volume label */ #define AM_LFN 0x0F /* LFN entry */ #define AM_DIR 0x10 /* Directory */ #define AM_ARC 0x20 /* Archive */ #define AM_MASK 0x3F /* Mask of defined bits */ /* Fast seek feature */ #define CREATE_LINKMAP 0xFFFFFFFF /*--------------------------------*/ /* Multi-byte word access macros */ #if _WORD_ACCESS == 1 /* Enable word access to the FAT structure */ #define LD_WORD(ptr) (WORD)(*(WORD*)(BYTE*)(ptr)) #define LD_DWORD(ptr) (DWORD)(*(DWORD*)(BYTE*)(ptr)) #define ST_WORD(ptr,val) *(WORD*)(BYTE*)(ptr)=(WORD)(val) #define ST_DWORD(ptr,val) *(DWORD*)(BYTE*)(ptr)=(DWORD)(val) #else /* Use byte-by-byte access to the FAT structure */ #define LD_WORD(ptr) (WORD)(((WORD)*((BYTE*)(ptr)+1)<<8)|(WORD)*(BYTE*)(ptr)) #define LD_DWORD(ptr) (DWORD)(((DWORD)*((BYTE*)(ptr)+3)<<24)|((DWORD)*((BYTE*)(ptr)+2)<<16)|((WORD)*((BYTE*)(ptr)+1)<<8)|*(BYTE*)(ptr)) #define ST_WORD(ptr,val) *(BYTE*)(ptr)=(BYTE)(val); *((BYTE*)(ptr)+1)=(BYTE)((WORD)(val)>>8) #define ST_DWORD(ptr,val) *(BYTE*)(ptr)=(BYTE)(val); *((BYTE*)(ptr)+1)=(BYTE)((WORD)(val)>>8); *((BYTE*)(ptr)+2)=(BYTE)((DWORD)(val)>>16); *((BYTE*)(ptr)+3)=(BYTE)((DWORD)(val)>>24) #endif #ifdef __cplusplus } #endif #endif /* _FATFS */ 根据头文件修改一下
最新发布
06-17
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值