copy content of a buffer_head

copy content of a buffer_head

Post by Zhiyong X » Sat, 23 Jun 2001 17:38:23



Hi,
      If I want to copy content of a buffer head to another memory, for
example:
In buffer head:
 contents is in bh->b_page, and bh->b_data point to the start of this page,
  page=alloc_page(GFP_KERNEL);
  char *data=page_address(page);
copy:
   memcpy(data, bh->b_data,bh->b_size),
   Is this correct?

    Thanks,