/* * While we're doing RMW on a stripe we put it into a hash table so we * can lock the stripe and merge more rbios into it.
*/ struct list_head hash_list;
/* LRU list for the stripe cache */ struct list_head stripe_cache;
/* For scheduling work in the helper threads */ struct work_struct work;
/* * bio_list and bio_list_lock are used to add more bios into the stripe * in hopes of avoiding the full RMW
*/ struct bio_list bio_list;
spinlock_t bio_list_lock;
/* * Also protected by the bio_list_lock, the plug list is used by the * plugging code to collect partial bios while plugged. The stripe * locking code also uses it to hand off the stripe lock to the next * pending IO.
*/ struct list_head plug_list;
/* Flags that tell us if it is safe to merge with this bio. */ unsignedlong flags;
/* * Set if we're doing a parity rebuild for a read from higher up, which * is handled differently from a parity rebuild as part of RMW.
*/ enum btrfs_rbio_ops operation;
/* How many pages there are for the full stripe including P/Q */
u16 nr_pages;
/* How many sectors there are for the full stripe including P/Q */
u16 nr_sectors;
/* Number of data stripes (no p/q) */
u8 nr_data;
/* Number of all stripes (including P/Q) */
u8 real_stripes;
/* How many pages there are for each stripe */
u8 stripe_npages;
/* How many sectors there are for each stripe */
u8 stripe_nsectors;
/* Stripe number that we're scrubbing */
u8 scrubp;
/* * Size of all the bios in the bio_list. This helps us decide if the * rbio maps to a full stripe or not.
*/ int bio_list_bytes;
refcount_t refs;
atomic_t stripes_pending;
wait_queue_head_t io_wait;
/* Bitmap to record which horizontal stripe has data */ unsignedlong dbitmap;
/* Allocated with stripe_nsectors-many bits for finish_*() calls */ unsignedlong finish_pbitmap;
/* * These are two arrays of pointers. We allocate the rbio big enough * to hold them both and setup their locations when the rbio is * allocated.
*/
/* * Pointers to pages that we allocated for reading/writing stripes * directly from the disk (including P/Q).
*/ struct page **stripe_pages;
/* Pointers to the sectors in the bio_list, for faster lookup */ struct sector_ptr *bio_sectors;
/* * For subpage support, we need to map each sector to above * stripe_pages.
*/ struct sector_ptr *stripe_sectors;
/* Allocated with real_stripes-many pointers for finish_*() calls */ void **finish_pointers;
/* * The bitmap recording where IO errors happened. * Each bit is corresponding to one sector in either bio_sectors[] or * stripe_sectors[] array. * * The reason we don't use another bit in sector_ptr is, we have two * arrays of sectors, and a lot of IO can use sectors in both arrays. * Thus making it much harder to iterate.
*/ unsignedlong *error_bitmap;
/* * Checksum buffer if the rbio is for data. The buffer should cover * all data sectors (excluding P/Q sectors).
*/
u8 *csum_buf;
/* * Each bit represents if the corresponding sector has data csum found. * Should only cover data sectors (excluding P/Q sectors).
*/ unsignedlong *csum_bitmap;
};
/* * For trace event usage only. Records useful debug info for each bio submitted * by RAID56 to each physical device. * * No matter signed or not, (-1) is always the one indicating we can not grab * the proper stripe number.
*/ struct raid56_bio_trace_info {
u64 devid;
/* The offset inside the stripe. (<= STRIPE_LEN) */
u32 offset;
/* * Stripe number. * 0 is the first data stripe, and nr_data for P stripe, * nr_data + 1 for Q stripe. * >= real_stripes for
*/
u8 stripe_nr;
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.