src
is a pointer to a block of memory that is internal to the filesystem, if you wish to stream data from a device to the MMC, then you will need intermediate code to buffer that stream in memory and pass it to the high-level filesystem write function. You should not access mmc_write()
directly.
How should i trace code like below?
mmc->block_dev.block_write = mmc_bwrite;
That is merely an assignment, not a function call. mmc_bwrite
is a pointer to the function:
mmc_bwrite(int dev_num, unsigned long start, lbaint_t blkcnt, const void *src)
It is a method of hooking the device driver implementation to the filesystem at run-time rather than by static link. Within the filesystem, mmc_bwrite()
will be called through mmc->block_dev.block_write
rather than directly. So
mmc->block_dev.block_write(curr_device, blk, cnt, addr);
is in fact a call to mmc_bwrite()
.