Re: [PATCH 3/4] block: Add and use a rw_stat_group function for indexing partition stat fields.

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

 



Michael Callahan <michaelcallahan@xxxxxx> writes:

> @@ -856,6 +856,7 @@ static void __zram_make_request(struct zram *zram, struct bio *bio)
>  	}
>  
>  	rw = bio_data_dir(bio);
> +	sgrp = rw_stat_group(bio->bi_rw)
>  	bio_for_each_segment(bvec, bio, iter) {
>  		int max_transfer_size = PAGE_SIZE - offset;
>  

Missing semicolon.

> @@ -434,6 +434,14 @@ static inline void free_part_info(struct hd_struct *part)
>  	kfree(part->info);
>  }
>  
> +static inline int rw_stat_group(unsigned int rw_flags)
> +{
> +	return rw_flags & 1;
> +}

This depends on STAT_READ and STAT_WRITE corresponding to READ and
WRITE, but that's not enforced anywhere.  It's a minor nit, but it sure
bugs the heck out of me.

Cheers,
Jeff
--
To unsubscribe from this list: send the line "unsubscribe linux-block" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux