| To: | xfs@xxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx |
|---|---|
| Subject: | Re: [RFC PATCH 2/9] dm: add methods to set and get reserved space |
| From: | Carlos Maiolino <cmaiolino@xxxxxxxxxx> |
| Date: | Mon, 21 Mar 2016 13:17:26 +0100 |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <1458225037-24155-3-git-send-email-bfoster@xxxxxxxxxx> |
| Mail-followup-to: | xfs@xxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx |
| References: | <1458225037-24155-1-git-send-email-bfoster@xxxxxxxxxx> <1458225037-24155-3-git-send-email-bfoster@xxxxxxxxxx> |
| User-agent: | Mutt/1.5.24 (2015-08-30) |
> +static int dm_blk_reserve_space(struct block_device *bdev, sector_t nr_sects)
> +{
> +
> +static int dm_blk_get_reserved_space(struct block_device *bdev,
> + sector_t *nr_sects)
> +{
These two functions are almost identical, what about refactoring it to a single
function like dm_blk_reserved_space(), and maybe adding a flags argument, for
choosing between set/get reserved space? Or maybe just add the common parts of
these two functions inside a helper function or a macro?!
--
Carlos
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [RFC PATCH 1/9] block: add block_device_operations methods to set and get reserved space, Carlos Maiolino |
|---|---|
| Next by Date: | Re: [RFC PATCH 0/9] dm-thin/xfs: prototype a block reservation allocation model, Carlos Maiolino |
| Previous by Thread: | [RFC PATCH 2/9] dm: add methods to set and get reserved space, Brian Foster |
| Next by Thread: | [RFC PATCH 4/9] dm thin: update reserve space func to allow reduction, Brian Foster |
| Indexes: | [Date] [Thread] [Top] [All Lists] |