Revision fd45e4784164d1017521086524e3442318c67370 authored by Dave Chinner on 02 January 2010, 02:38:56 UTC, committed by Alex Elder on 10 January 2010, 18:22:02 UTC
When we search for and find a busy extent during allocation we force the log out to ensure the extent free transaction is on disk before the allocation transaction. The current implementation has a subtle bug in it--it does not handle multiple overlapping ranges. That is, if we free lots of little extents into a single contiguous extent, then allocate the contiguous extent, the busy search code stops searching at the first extent it finds that overlaps the allocated range. It then uses the commit LSN of the transaction to force the log out to. Unfortunately, the other busy ranges might have more recent commit LSNs than the first busy extent that is found, and this results in xfs_alloc_search_busy() returning before all the extent free transactions are on disk for the range being allocated. This can lead to potential metadata corruption or stale data exposure after a crash because log replay won't replay all the extent free transactions that cover the allocation range. Modified-by: Alex Elder <aelder@sgi.com> (Dropped the "found" argument from the xfs_alloc_busysearch trace event.) Signed-off-by: Dave Chinner <david@fromorbit.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Alex Elder <aelder@sgi.com>
1 parent 44e08c4
broadsheetfb.h
/*
* broadsheetfb.h - definitions for the broadsheet framebuffer driver
*
* Copyright (C) 2008 by Jaya Kumar
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file COPYING in the main directory of this archive for
* more details.
*
*/
#ifndef _LINUX_BROADSHEETFB_H_
#define _LINUX_BROADSHEETFB_H_
/* Broadsheet command defines */
#define BS_CMD_INIT_SYS_RUN 0x06
#define BS_CMD_INIT_DSPE_CFG 0x09
#define BS_CMD_INIT_DSPE_TMG 0x0A
#define BS_CMD_INIT_ROTMODE 0x0B
#define BS_CMD_RD_REG 0x10
#define BS_CMD_WR_REG 0x11
#define BS_CMD_LD_IMG 0x20
#define BS_CMD_LD_IMG_AREA 0x22
#define BS_CMD_LD_IMG_END 0x23
#define BS_CMD_WAIT_DSPE_TRG 0x28
#define BS_CMD_WAIT_DSPE_FREND 0x29
#define BS_CMD_RD_WFM_INFO 0x30
#define BS_CMD_UPD_INIT 0x32
#define BS_CMD_UPD_FULL 0x33
#define BS_CMD_UPD_GDRV_CLR 0x37
/* Broadsheet pin interface specific defines */
#define BS_CS 0x01
#define BS_DC 0x02
#define BS_WR 0x03
/* struct used by broadsheet. board specific stuff comes from *board */
struct broadsheetfb_par {
struct fb_info *info;
struct broadsheet_board *board;
void (*write_reg)(struct broadsheetfb_par *, u16 reg, u16 val);
u16 (*read_reg)(struct broadsheetfb_par *, u16 reg);
wait_queue_head_t waitq;
};
/* board specific routines */
struct broadsheet_board {
struct module *owner;
int (*init)(struct broadsheetfb_par *);
int (*wait_for_rdy)(struct broadsheetfb_par *);
void (*set_ctl)(struct broadsheetfb_par *, unsigned char, u8);
void (*set_hdb)(struct broadsheetfb_par *, u16);
u16 (*get_hdb)(struct broadsheetfb_par *);
void (*cleanup)(struct broadsheetfb_par *);
int (*get_panel_type)(void);
int (*setup_irq)(struct fb_info *);
};
#endif
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...