Re: [PATCH 1/6] Add helper function for blkdev_issue_zeroout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 15, 2010 at 12:36 PM, Lukas Czerner <lczerner@xxxxxxxxxx> wrote:
> This is done the same way as function sb_issue_discard for
> blkdev_issue_discard.
>
> Signed-off-by: Lukas Czerner <lczerner@xxxxxxxxxx>
> ---
>  include/linux/blkdev.h |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
> index 09a8402..a22939d 100644
> --- a/include/linux/blkdev.h
> +++ b/include/linux/blkdev.h
> @@ -1023,6 +1023,14 @@ static inline int sb_issue_discard(struct super_block *sb,
>        return blkdev_issue_discard(sb->s_bdev, block, nr_blocks, GFP_KERNEL,
>                                   BLKDEV_IFL_WAIT | BLKDEV_IFL_BARRIER);
>  }
> +static inline int sb_issue_zeroout(struct super_block *sb,
> +                                  sector_t block, sector_t nr_blocks)
> +{
> +       block <<= (sb->s_blocksize_bits - 9);
> +       nr_blocks <<= (sb->s_blocksize_bits - 9);
> +       return blkdev_issue_zeroout(sb->s_bdev, block, nr_blocks, GFP_KERNEL,
> +                                  BLKDEV_IFL_WAIT | BLKDEV_IFL_BARRIER);
> +}

You'll need to rebase this patch against Jens' linux-2.6-block.git
'for-next' branch.  The flags have changed such that the
sb_issue_discard caller passes them in (and BLKDEV_IFL_BARRIER no
longer exists).  See the following commits from linux-2.6-block.git:

http://git.kernel.org/?p=linux/kernel/git/axboe/linux-2.6-block.git;a=commit;h=2cf6d26a354ab
http://git.kernel.org/?p=linux/kernel/git/axboe/linux-2.6-block.git;a=commit;h=61002f7db33c7
http://git.kernel.org/?p=linux/kernel/git/axboe/linux-2.6-block.git;a=commit;h=8c5553678237b
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux