lkml.org 
[lkml]   [2008]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 07/10] AXFS: axfs_bdev.c
On Wed, Aug 20, 2008 at 10:45:47PM -0700, Jared Hulbert wrote:
>+/******************************************************************************
>+ *
>+ * axfs_copy_block_data
>+ *
>+ * Description: Helper function to read data from block device
>+ *
>+ * Parameters:
>+ * (IN) sb - pointer to super block structure.
>+ *
>+ * (IN) dst_addr - pointer to buffer into which data is to be read.
>+ *
>+ * (IN) boffset - offset within block device
>+ *
>+ * (IN) len - length of data to be read
>+ *
>+ * Returns:
>+ * 0 or error number
>+ *
>+ *****************************************************************************/
>+int axfs_copy_block(struct super_block *sb, void *dst_addr, u64 fsoffset,
>+ u64 len)

mismatch between documentation and implementation WRT the function name ;)


>+{
>+ struct axfs_super *sbi = AXFS_SB(sb);
>+ u64 boffset = AXFS_FSOFFSET_2_DEVOFFSET(sbi, fsoffset);
>+ u64 blocks;
>+ u64 blksize = sb->s_blocksize;
>+ unsigned long dst;
>+ unsigned long src;
>+ sector_t block;
>+ size_t bytes;
>+ struct buffer_head *bh;
>+ u64 copied = 0;
>+
>+ if (len == 0)
>+ return 0;
>+
>+ blocks = len / blksize;
>+ if ((len % blksize) > 0)
>+ blocks += 1;
>+
>+ while (copied < len) {
>+ /* Explicit casting for ARM linker errors. */

did it try to emit some external div()? Is this still needed?


\
 
 \ /
  Last update: 2008-08-22 14:57    [W:0.078 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site