* Re: [kbd] kbd: loadkeys -d doesn't work
From: Jaroslav Skarvada @ 2011-10-22 11:35 UTC (permalink / raw)
To: Linux console tools development discussion
In-Reply-To: <4EA1F81D.3060504@gmail.com>
> 21.10.2011 18:56, Jaroslav Skarvada wrote:
> > I think it shouldn't read stdin in case of optd
>
> But in your previous email to you, do exactly the same.
> What has changed?
>
> Why behavior when the file must be different from the standard input
> handle ? I don't see any difference.
>
I tried your git head, loadkeys -d loads defkeymap as expected
but it then blocks on reading stdin. According to doc I think it
should return after the defkeymap is loaded. Sorry if I missed
anything
regards
Jaroslav
^ permalink raw reply
* [PATCH RESEND V2 4/4] i2c/au1550: dev_pm_ops conversion
From: Manuel Lauss @ 2011-10-22 11:34 UTC (permalink / raw)
To: linux-i2c-u79uwXL29TY76Z2rM5mHXA, Ben Dooks; +Cc: Manuel Lauss
In-Reply-To: <1319283279-2296-1-git-send-email-manuel.lauss-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
use newer dev_pm_ops for PM
Signed-off-by: Manuel Lauss <manuel.lauss-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
---
V2: no changes
drivers/i2c/busses/i2c-au1550.c | 24 ++++++++++++++----------
1 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/drivers/i2c/busses/i2c-au1550.c b/drivers/i2c/busses/i2c-au1550.c
index 4f5150c..4f757a2 100644
--- a/drivers/i2c/busses/i2c-au1550.c
+++ b/drivers/i2c/busses/i2c-au1550.c
@@ -387,39 +387,43 @@ static int __devexit i2c_au1550_remove(struct platform_device *pdev)
}
#ifdef CONFIG_PM
-static int
-i2c_au1550_suspend(struct platform_device *pdev, pm_message_t state)
+static int i2c_au1550_suspend(struct device *dev)
{
- struct i2c_au1550_data *priv = platform_get_drvdata(pdev);
+ struct i2c_au1550_data *priv = dev_get_drvdata(dev);
i2c_au1550_disable(priv);
return 0;
}
-static int
-i2c_au1550_resume(struct platform_device *pdev)
+static int i2c_au1550_resume(struct device *dev)
{
- struct i2c_au1550_data *priv = platform_get_drvdata(pdev);
+ struct i2c_au1550_data *priv = dev_get_drvdata(dev);
i2c_au1550_setup(priv);
return 0;
}
+
+static const struct dev_pm_ops i2c_au1550_pmops = {
+ .suspend = i2c_au1550_suspend,
+ .resume = i2c_au1550_resume,
+};
+
+#define AU1XPSC_SMBUS_PMOPS (&i2c_au1550_pmops)
+
#else
-#define i2c_au1550_suspend NULL
-#define i2c_au1550_resume NULL
+#define AU1XPSC_SMBUS_PMOPS NULL
#endif
static struct platform_driver au1xpsc_smbus_driver = {
.driver = {
.name = "au1xpsc_smbus",
.owner = THIS_MODULE,
+ .pm = AU1XPSC_SMBUS_PMOPS,
},
.probe = i2c_au1550_probe,
.remove = __devexit_p(i2c_au1550_remove),
- .suspend = i2c_au1550_suspend,
- .resume = i2c_au1550_resume,
};
static int __init i2c_au1550_init(void)
--
1.7.6.1
^ permalink raw reply related
* [PATCH RESEND V2 3/4] i2c/au1550: increase timeout waiting for master done
From: Manuel Lauss @ 2011-10-22 11:34 UTC (permalink / raw)
To: linux-i2c-u79uwXL29TY76Z2rM5mHXA, Ben Dooks; +Cc: Manuel Lauss
In-Reply-To: <1319283279-2296-1-git-send-email-manuel.lauss-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
Double the timeout in the loop which busy-waits for the "master-done"
bit to be set. This bit indicates whether an i2c transaction has
completed; on the DB1300 and DB1550 boards this timeout is slightly
too short and causes transactions to the WM8731 codec to be falsely flagged
as failed. The timeout itself is necessary since transactions to
non-existant slaves never set this bit in the first place (and cause
i2cdetect to hang).
With this change the WM8731 codec on the DB1300/DB1550 boards is correctly
detected and initialized.
Signed-off-by: Manuel Lauss <manuel.lauss-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
---
V2: changed timeout only for master done bit, updated patch description.
drivers/i2c/busses/i2c-au1550.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/i2c/busses/i2c-au1550.c b/drivers/i2c/busses/i2c-au1550.c
index 98ee11a..4f5150c 100644
--- a/drivers/i2c/busses/i2c-au1550.c
+++ b/drivers/i2c/busses/i2c-au1550.c
@@ -101,7 +101,7 @@ static int wait_master_done(struct i2c_au1550_data *adap)
int i;
/* Wait for Master Done. */
- for (i = 0; i < adap->xfer_timeout; i++) {
+ for (i = 0; i < 2 * adap->xfer_timeout; i++) {
if ((RD(adap, PSC_SMBEVNT) & PSC_SMBEVNT_MD) != 0)
return 0;
udelay(1);
--
1.7.6.1
^ permalink raw reply related
* [PATCH RESEND V2 2/4] i2c/au1550: remove unused ack_timeout
From: Manuel Lauss @ 2011-10-22 11:34 UTC (permalink / raw)
To: linux-i2c-u79uwXL29TY76Z2rM5mHXA, Ben Dooks; +Cc: Manuel Lauss
In-Reply-To: <1319283279-2296-1-git-send-email-manuel.lauss-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
The ack_timeout context member is unused, get rid of it.
Signed-off-by: Manuel Lauss <manuel.lauss-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
---
V2: no changes
drivers/i2c/busses/i2c-au1550.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-au1550.c b/drivers/i2c/busses/i2c-au1550.c
index 70b027c..98ee11a 100644
--- a/drivers/i2c/busses/i2c-au1550.c
+++ b/drivers/i2c/busses/i2c-au1550.c
@@ -52,7 +52,6 @@
struct i2c_au1550_data {
void __iomem *psc_base;
int xfer_timeout;
- int ack_timeout;
struct i2c_adapter adap;
struct resource *ioarea;
};
@@ -346,7 +345,6 @@ i2c_au1550_probe(struct platform_device *pdev)
goto out_map;
}
priv->xfer_timeout = 200;
- priv->ack_timeout = 200;
priv->adap.nr = pdev->id;
priv->adap.algo = &au1550_algo;
--
1.7.6.1
^ permalink raw reply related
* [PATCH RESEND V2 1/4] i2c/au1550: remove usage of volatile keyword
From: Manuel Lauss @ 2011-10-22 11:34 UTC (permalink / raw)
To: linux-i2c-u79uwXL29TY76Z2rM5mHXA, Ben Dooks; +Cc: Manuel Lauss
In-Reply-To: <1319283279-2296-1-git-send-email-manuel.lauss-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
Replace the usage of "volatile"s with register accessor functions.
Signed-off-by: Manuel Lauss <manuel.lauss-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
---
V2: no changes
arch/mips/include/asm/mach-au1x00/au1xxx_psc.h | 13 --
drivers/i2c/busses/i2c-au1550.c | 252 +++++++++--------------
2 files changed, 99 insertions(+), 166 deletions(-)
diff --git a/arch/mips/include/asm/mach-au1x00/au1xxx_psc.h b/arch/mips/include/asm/mach-au1x00/au1xxx_psc.h
index 892b7f1..5a5cb73 100644
--- a/arch/mips/include/asm/mach-au1x00/au1xxx_psc.h
+++ b/arch/mips/include/asm/mach-au1x00/au1xxx_psc.h
@@ -394,19 +394,6 @@ typedef struct psc_spi {
#define PSC_SPITXRX_LC (1 << 29)
#define PSC_SPITXRX_SR (1 << 28)
-/* PSC in SMBus (I2C) Mode. */
-typedef struct psc_smb {
- u32 psc_sel;
- u32 psc_ctrl;
- u32 psc_smbcfg;
- u32 psc_smbmsk;
- u32 psc_smbpcr;
- u32 psc_smbstat;
- u32 psc_smbevnt;
- u32 psc_smbtxrx;
- u32 psc_smbtmr;
-} psc_smb_t;
-
/* SMBus Config Register. */
#define PSC_SMBCFG_RT_MASK (3 << 30)
#define PSC_SMBCFG_RT_FIFO1 (0 << 30)
diff --git a/drivers/i2c/busses/i2c-au1550.c b/drivers/i2c/busses/i2c-au1550.c
index 532828b..70b027c 100644
--- a/drivers/i2c/busses/i2c-au1550.c
+++ b/drivers/i2c/busses/i2c-au1550.c
@@ -39,29 +39,42 @@
#include <asm/mach-au1x00/au1xxx.h>
#include <asm/mach-au1x00/au1xxx_psc.h>
+#define PSC_SEL 0x00
+#define PSC_CTRL 0x04
+#define PSC_SMBCFG 0x08
+#define PSC_SMBMSK 0x0C
+#define PSC_SMBPCR 0x10
+#define PSC_SMBSTAT 0x14
+#define PSC_SMBEVNT 0x18
+#define PSC_SMBTXRX 0x1C
+#define PSC_SMBTMR 0x20
+
struct i2c_au1550_data {
- u32 psc_base;
+ void __iomem *psc_base;
int xfer_timeout;
int ack_timeout;
struct i2c_adapter adap;
struct resource *ioarea;
};
-static int
-wait_xfer_done(struct i2c_au1550_data *adap)
+static inline void WR(struct i2c_au1550_data *a, int r, unsigned long v)
{
- u32 stat;
- int i;
- volatile psc_smb_t *sp;
+ __raw_writel(v, a->psc_base + r);
+ wmb();
+}
- sp = (volatile psc_smb_t *)(adap->psc_base);
+static inline unsigned long RD(struct i2c_au1550_data *a, int r)
+{
+ return __raw_readl(a->psc_base + r);
+}
- /* Wait for Tx Buffer Empty
- */
+static int wait_xfer_done(struct i2c_au1550_data *adap)
+{
+ int i;
+
+ /* Wait for Tx Buffer Empty */
for (i = 0; i < adap->xfer_timeout; i++) {
- stat = sp->psc_smbstat;
- au_sync();
- if ((stat & PSC_SMBSTAT_TE) != 0)
+ if (RD(adap, PSC_SMBSTAT) & PSC_SMBSTAT_TE)
return 0;
udelay(1);
@@ -70,41 +83,27 @@ wait_xfer_done(struct i2c_au1550_data *adap)
return -ETIMEDOUT;
}
-static int
-wait_ack(struct i2c_au1550_data *adap)
+static int wait_ack(struct i2c_au1550_data *adap)
{
- u32 stat;
- volatile psc_smb_t *sp;
+ unsigned long stat;
if (wait_xfer_done(adap))
return -ETIMEDOUT;
- sp = (volatile psc_smb_t *)(adap->psc_base);
-
- stat = sp->psc_smbevnt;
- au_sync();
-
+ stat = RD(adap, PSC_SMBEVNT);
if ((stat & (PSC_SMBEVNT_DN | PSC_SMBEVNT_AN | PSC_SMBEVNT_AL)) != 0)
return -ETIMEDOUT;
return 0;
}
-static int
-wait_master_done(struct i2c_au1550_data *adap)
+static int wait_master_done(struct i2c_au1550_data *adap)
{
- u32 stat;
- int i;
- volatile psc_smb_t *sp;
+ int i;
- sp = (volatile psc_smb_t *)(adap->psc_base);
-
- /* Wait for Master Done.
- */
+ /* Wait for Master Done. */
for (i = 0; i < adap->xfer_timeout; i++) {
- stat = sp->psc_smbevnt;
- au_sync();
- if ((stat & PSC_SMBEVNT_MD) != 0)
+ if ((RD(adap, PSC_SMBEVNT) & PSC_SMBEVNT_MD) != 0)
return 0;
udelay(1);
}
@@ -115,29 +114,20 @@ wait_master_done(struct i2c_au1550_data *adap)
static int
do_address(struct i2c_au1550_data *adap, unsigned int addr, int rd, int q)
{
- volatile psc_smb_t *sp;
- u32 stat;
+ unsigned long stat;
- sp = (volatile psc_smb_t *)(adap->psc_base);
-
- /* Reset the FIFOs, clear events.
- */
- stat = sp->psc_smbstat;
- sp->psc_smbevnt = PSC_SMBEVNT_ALLCLR;
- au_sync();
+ /* Reset the FIFOs, clear events. */
+ stat = RD(adap, PSC_SMBSTAT);
+ WR(adap, PSC_SMBEVNT, PSC_SMBEVNT_ALLCLR);
if (!(stat & PSC_SMBSTAT_TE) || !(stat & PSC_SMBSTAT_RE)) {
- sp->psc_smbpcr = PSC_SMBPCR_DC;
- au_sync();
- do {
- stat = sp->psc_smbpcr;
- au_sync();
- } while ((stat & PSC_SMBPCR_DC) != 0);
+ WR(adap, PSC_SMBPCR, PSC_SMBPCR_DC);
+ while ((RD(adap, PSC_SMBPCR) & PSC_SMBPCR_DC) != 0)
+ cpu_relax();
udelay(50);
}
- /* Write out the i2c chip address and specify operation
- */
+ /* Write out the i2c chip address and specify operation */
addr <<= 1;
if (rd)
addr |= 1;
@@ -146,56 +136,42 @@ do_address(struct i2c_au1550_data *adap, unsigned int addr, int rd, int q)
if (q)
addr |= PSC_SMBTXRX_STP;
- /* Put byte into fifo, start up master.
- */
- sp->psc_smbtxrx = addr;
- au_sync();
- sp->psc_smbpcr = PSC_SMBPCR_MS;
- au_sync();
+ /* Put byte into fifo, start up master. */
+ WR(adap, PSC_SMBTXRX, addr);
+ WR(adap, PSC_SMBPCR, PSC_SMBPCR_MS);
if (wait_ack(adap))
return -EIO;
return (q) ? wait_master_done(adap) : 0;
}
-static u32
-wait_for_rx_byte(struct i2c_au1550_data *adap, u32 *ret_data)
+static int wait_for_rx_byte(struct i2c_au1550_data *adap, unsigned char *out)
{
- int j;
- u32 data, stat;
- volatile psc_smb_t *sp;
+ int j;
if (wait_xfer_done(adap))
return -EIO;
- sp = (volatile psc_smb_t *)(adap->psc_base);
-
j = adap->xfer_timeout * 100;
do {
j--;
if (j <= 0)
return -EIO;
- stat = sp->psc_smbstat;
- au_sync();
- if ((stat & PSC_SMBSTAT_RE) == 0)
+ if ((RD(adap, PSC_SMBSTAT) & PSC_SMBSTAT_RE) == 0)
j = 0;
else
udelay(1);
} while (j > 0);
- data = sp->psc_smbtxrx;
- au_sync();
- *ret_data = data;
+
+ *out = RD(adap, PSC_SMBTXRX);
return 0;
}
-static int
-i2c_read(struct i2c_au1550_data *adap, unsigned char *buf,
+static int i2c_read(struct i2c_au1550_data *adap, unsigned char *buf,
unsigned int len)
{
- int i;
- u32 data;
- volatile psc_smb_t *sp;
+ int i;
if (len == 0)
return 0;
@@ -204,62 +180,46 @@ i2c_read(struct i2c_au1550_data *adap, unsigned char *buf,
* zero bytes for timing, waiting for bytes to appear in the
* receive fifo, then reading the bytes.
*/
-
- sp = (volatile psc_smb_t *)(adap->psc_base);
-
i = 0;
- while (i < (len-1)) {
- sp->psc_smbtxrx = 0;
- au_sync();
- if (wait_for_rx_byte(adap, &data))
+ while (i < (len - 1)) {
+ WR(adap, PSC_SMBTXRX, 0);
+ if (wait_for_rx_byte(adap, &buf[i]))
return -EIO;
- buf[i] = data;
i++;
}
- /* The last byte has to indicate transfer done.
- */
- sp->psc_smbtxrx = PSC_SMBTXRX_STP;
- au_sync();
+ /* The last byte has to indicate transfer done. */
+ WR(adap, PSC_SMBTXRX, PSC_SMBTXRX_STP);
if (wait_master_done(adap))
return -EIO;
- data = sp->psc_smbtxrx;
- au_sync();
- buf[i] = data;
+ buf[i] = (unsigned char)(RD(adap, PSC_SMBTXRX) & 0xff);
return 0;
}
-static int
-i2c_write(struct i2c_au1550_data *adap, unsigned char *buf,
+static int i2c_write(struct i2c_au1550_data *adap, unsigned char *buf,
unsigned int len)
{
- int i;
- u32 data;
- volatile psc_smb_t *sp;
+ int i;
+ unsigned long data;
if (len == 0)
return 0;
- sp = (volatile psc_smb_t *)(adap->psc_base);
-
i = 0;
while (i < (len-1)) {
data = buf[i];
- sp->psc_smbtxrx = data;
- au_sync();
+ WR(adap, PSC_SMBTXRX, data);
if (wait_ack(adap))
return -EIO;
i++;
}
- /* The last byte has to indicate transfer done.
- */
+ /* The last byte has to indicate transfer done. */
data = buf[i];
data |= PSC_SMBTXRX_STP;
- sp->psc_smbtxrx = data;
- au_sync();
+ WR(adap, PSC_SMBTXRX, data);
if (wait_master_done(adap))
return -EIO;
return 0;
@@ -269,12 +229,10 @@ static int
au1550_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs, int num)
{
struct i2c_au1550_data *adap = i2c_adap->algo_data;
- volatile psc_smb_t *sp = (volatile psc_smb_t *)adap->psc_base;
struct i2c_msg *p;
int i, err = 0;
- sp->psc_ctrl = PSC_CTRL_ENABLE;
- au_sync();
+ WR(adap, PSC_CTRL, PSC_CTRL_ENABLE);
for (i = 0; !err && i < num; i++) {
p = &msgs[i];
@@ -293,14 +251,12 @@ au1550_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs, int num)
if (err == 0)
err = num;
- sp->psc_ctrl = PSC_CTRL_SUSPEND;
- au_sync();
+ WR(adap, PSC_CTRL, PSC_CTRL_SUSPEND);
return err;
}
-static u32
-au1550_func(struct i2c_adapter *adap)
+static u32 au1550_func(struct i2c_adapter *adap)
{
return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL;
}
@@ -312,57 +268,45 @@ static const struct i2c_algorithm au1550_algo = {
static void i2c_au1550_setup(struct i2c_au1550_data *priv)
{
- volatile psc_smb_t *sp = (volatile psc_smb_t *)priv->psc_base;
- u32 stat;
-
- sp->psc_ctrl = PSC_CTRL_DISABLE;
- au_sync();
- sp->psc_sel = PSC_SEL_PS_SMBUSMODE;
- sp->psc_smbcfg = 0;
- au_sync();
- sp->psc_ctrl = PSC_CTRL_ENABLE;
- au_sync();
- do {
- stat = sp->psc_smbstat;
- au_sync();
- } while ((stat & PSC_SMBSTAT_SR) == 0);
+ unsigned long cfg;
- sp->psc_smbcfg = (PSC_SMBCFG_RT_FIFO8 | PSC_SMBCFG_TT_FIFO8 |
- PSC_SMBCFG_DD_DISABLE);
+ WR(priv, PSC_CTRL, PSC_CTRL_DISABLE);
+ WR(priv, PSC_SEL, PSC_SEL_PS_SMBUSMODE);
+ WR(priv, PSC_SMBCFG, 0);
+ WR(priv, PSC_CTRL, PSC_CTRL_ENABLE);
+ while ((RD(priv, PSC_SMBSTAT) & PSC_SMBSTAT_SR) == 0)
+ cpu_relax();
+
+ cfg = PSC_SMBCFG_RT_FIFO8 | PSC_SMBCFG_TT_FIFO8 | PSC_SMBCFG_DD_DISABLE;
+ WR(priv, PSC_SMBCFG, cfg);
/* Divide by 8 to get a 6.25 MHz clock. The later protocol
* timings are based on this clock.
*/
- sp->psc_smbcfg |= PSC_SMBCFG_SET_DIV(PSC_SMBCFG_DIV8);
- sp->psc_smbmsk = PSC_SMBMSK_ALLMASK;
- au_sync();
+ cfg |= PSC_SMBCFG_SET_DIV(PSC_SMBCFG_DIV8);
+ WR(priv, PSC_SMBCFG, cfg);
+ WR(priv, PSC_SMBMSK, PSC_SMBMSK_ALLMASK);
/* Set the protocol timer values. See Table 71 in the
* Au1550 Data Book for standard timing values.
*/
- sp->psc_smbtmr = PSC_SMBTMR_SET_TH(0) | PSC_SMBTMR_SET_PS(15) | \
+ WR(priv, PSC_SMBTMR, PSC_SMBTMR_SET_TH(0) | PSC_SMBTMR_SET_PS(15) | \
PSC_SMBTMR_SET_PU(15) | PSC_SMBTMR_SET_SH(15) | \
PSC_SMBTMR_SET_SU(15) | PSC_SMBTMR_SET_CL(15) | \
- PSC_SMBTMR_SET_CH(15);
- au_sync();
+ PSC_SMBTMR_SET_CH(15));
- sp->psc_smbcfg |= PSC_SMBCFG_DE_ENABLE;
- do {
- stat = sp->psc_smbstat;
- au_sync();
- } while ((stat & PSC_SMBSTAT_SR) == 0);
+ cfg |= PSC_SMBCFG_DE_ENABLE;
+ WR(priv, PSC_SMBCFG, cfg);
+ while ((RD(priv, PSC_SMBSTAT) & PSC_SMBSTAT_SR) == 0)
+ cpu_relax();
- sp->psc_ctrl = PSC_CTRL_SUSPEND;
- au_sync();
+ WR(priv, PSC_CTRL, PSC_CTRL_SUSPEND);
}
static void i2c_au1550_disable(struct i2c_au1550_data *priv)
{
- volatile psc_smb_t *sp = (volatile psc_smb_t *)priv->psc_base;
-
- sp->psc_smbcfg = 0;
- sp->psc_ctrl = PSC_CTRL_DISABLE;
- au_sync();
+ WR(priv, PSC_SMBCFG, 0);
+ WR(priv, PSC_CTRL, PSC_CTRL_DISABLE);
}
/*
@@ -396,7 +340,11 @@ i2c_au1550_probe(struct platform_device *pdev)
goto out_mem;
}
- priv->psc_base = CKSEG1ADDR(r->start);
+ priv->psc_base = ioremap(r->start, resource_size(r));
+ if (!priv->psc_base) {
+ ret = -EIO;
+ goto out_map;
+ }
priv->xfer_timeout = 200;
priv->ack_timeout = 200;
@@ -406,8 +354,7 @@ i2c_au1550_probe(struct platform_device *pdev)
priv->adap.dev.parent = &pdev->dev;
strlcpy(priv->adap.name, "Au1xxx PSC I2C", sizeof(priv->adap.name));
- /* Now, set up the PSC for SMBus PIO mode.
- */
+ /* Now, set up the PSC for SMBus PIO mode. */
i2c_au1550_setup(priv);
ret = i2c_add_numbered_adapter(&priv->adap);
@@ -417,7 +364,8 @@ i2c_au1550_probe(struct platform_device *pdev)
}
i2c_au1550_disable(priv);
-
+ iounmap(priv->psc_base);
+out_map:
release_resource(priv->ioarea);
kfree(priv->ioarea);
out_mem:
@@ -426,14 +374,14 @@ out:
return ret;
}
-static int __devexit
-i2c_au1550_remove(struct platform_device *pdev)
+static int __devexit i2c_au1550_remove(struct platform_device *pdev)
{
struct i2c_au1550_data *priv = platform_get_drvdata(pdev);
platform_set_drvdata(pdev, NULL);
i2c_del_adapter(&priv->adap);
i2c_au1550_disable(priv);
+ iounmap(priv->psc_base);
release_resource(priv->ioarea);
kfree(priv->ioarea);
kfree(priv);
@@ -476,14 +424,12 @@ static struct platform_driver au1xpsc_smbus_driver = {
.resume = i2c_au1550_resume,
};
-static int __init
-i2c_au1550_init(void)
+static int __init i2c_au1550_init(void)
{
return platform_driver_register(&au1xpsc_smbus_driver);
}
-static void __exit
-i2c_au1550_exit(void)
+static void __exit i2c_au1550_exit(void)
{
platform_driver_unregister(&au1xpsc_smbus_driver);
}
--
1.7.6.1
^ permalink raw reply related
* [PATCH RESEND V2 0/4] i2c: i2c-au1550 updates
From: Manuel Lauss @ 2011-10-22 11:34 UTC (permalink / raw)
To: linux-i2c-u79uwXL29TY76Z2rM5mHXA, Ben Dooks; +Cc: Manuel Lauss
The following patches remove some bit-rot from the i2c-au1550 driver.
(Patch #3 supersedes the one I sent on 2011-06-12:
"i2c-au1550: increase timeout waiting for transactions to finish").
#1 gets rid of all instances of the "volatile" keyword,
#2 removes an unused context member,
#3 fixes i2c on the DB1300/DB1550 boards
#4 updates PM methods.
All run- and pm-tested on DB1200/DB1300/DB1550 hardware.
Changes since V1:
- updated patch #3 and its description.
Please consider for 3.2.
Manuel Lauss (4):
i2c/au1550: remove usage of volatile keyword
i2c/au1550: remove unused ack_timeout
i2c/au1550: increase timeout waiting for master done
i2c/au1550: dev_pm_ops conversion
arch/mips/include/asm/mach-au1x00/au1xxx_psc.h | 13 -
drivers/i2c/busses/i2c-au1550.c | 280 ++++++++++--------------
2 files changed, 114 insertions(+), 179 deletions(-)
--
1.7.6.1
^ permalink raw reply
* [v2 PATCH 4/4] CIFS: Make cifs_push_locks send as many locks at once as possible
From: Pavel Shilovsky @ 2011-10-22 11:33 UTC (permalink / raw)
To: linux-cifs-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1319283212-19024-1-git-send-email-piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org>
that reduces a traffic and increases a performance.
Signed-off-by: Pavel Shilovsky <piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org>
---
fs/cifs/file.c | 49 +++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 43 insertions(+), 6 deletions(-)
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 569184e..ea096ce 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -829,6 +829,11 @@ cifs_push_mandatory_locks(struct cifsFileInfo *cfile)
struct cifsLockInfo *li, *tmp;
struct cifs_tcon *tcon;
struct cifsInodeInfo *cinode = CIFS_I(cfile->dentry->d_inode);
+ unsigned int num, max_num;
+ LOCKING_ANDX_RANGE *buf, *cur;
+ int types[] = {LOCKING_ANDX_LARGE_FILES,
+ LOCKING_ANDX_SHARED_LOCK | LOCKING_ANDX_LARGE_FILES};
+ int i;
xid = GetXid();
tcon = tlink_tcon(cfile->tlink);
@@ -840,17 +845,49 @@ cifs_push_mandatory_locks(struct cifsFileInfo *cfile)
return rc;
}
- list_for_each_entry_safe(li, tmp, &cinode->llist, llist) {
- stored_rc = CIFSSMBLock(xid, tcon, cfile->netfid,
- li->pid, li->length, li->offset,
- 0, 1, li->type, 0, 0);
- if (stored_rc)
- rc = stored_rc;
+ max_num = (tcon->ses->server->maxBuf - sizeof(struct smb_hdr)) /
+ sizeof(LOCKING_ANDX_RANGE);
+ buf = kzalloc(max_num * sizeof(LOCKING_ANDX_RANGE), GFP_KERNEL);
+ if (!buf) {
+ mutex_unlock(&cinode->lock_mutex);
+ FreeXid(xid);
+ return rc;
+ }
+
+ for (i = 0; i < 2; i++) {
+ cur = buf;
+ num = 0;
+ list_for_each_entry_safe(li, tmp, &cinode->llist, llist) {
+ if (li->type != types[i])
+ continue;
+ cur->Pid = cpu_to_le16(li->pid);
+ cur->LengthLow = cpu_to_le32((u32)li->length);
+ cur->LengthHigh = cpu_to_le32((u32)(li->length>>32));
+ cur->OffsetLow = cpu_to_le32((u32)li->offset);
+ cur->OffsetHigh = cpu_to_le32((u32)(li->offset>>32));
+ if (++num == max_num) {
+ stored_rc = cifs_lockv(xid, tcon, cfile->netfid,
+ li->type, 0, num, buf);
+ if (stored_rc)
+ rc = stored_rc;
+ cur = buf;
+ num = 0;
+ } else
+ cur++;
+ }
+
+ if (num) {
+ stored_rc = cifs_lockv(xid, tcon, cfile->netfid,
+ types[i], 0, num, buf);
+ if (stored_rc)
+ rc = stored_rc;
+ }
}
cinode->can_cache_brlcks = false;
mutex_unlock(&cinode->lock_mutex);
+ kfree(buf);
FreeXid(xid);
return rc;
}
--
1.7.1
^ permalink raw reply related
* [v2 PATCH 3/4] CIFS: Send as many mandatory unlock ranges at once as possible
From: Pavel Shilovsky @ 2011-10-22 11:33 UTC (permalink / raw)
To: linux-cifs-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1319283212-19024-1-git-send-email-piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org>
that reduces a traffic and increases a performance.
Signed-off-by: Pavel Shilovsky <piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org>
---
fs/cifs/cifsproto.h | 3 +
fs/cifs/cifssmb.c | 40 +++++++++++++
fs/cifs/file.c | 160 +++++++++++++++++++++++++++++++++++++++------------
3 files changed, 167 insertions(+), 36 deletions(-)
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h
index 67c26cf..ef4f631 100644
--- a/fs/cifs/cifsproto.h
+++ b/fs/cifs/cifsproto.h
@@ -368,6 +368,9 @@ extern int CIFSGetSrvInodeNumber(const int xid, struct cifs_tcon *tcon,
const struct nls_table *nls_codepage,
int remap_special_chars);
+extern int cifs_lockv(const int xid, struct cifs_tcon *tcon, const __u16 netfid,
+ const __u8 lock_type, const __u32 num_unlock,
+ const __u32 num_lock, LOCKING_ANDX_RANGE *buf);
extern int CIFSSMBLock(const int xid, struct cifs_tcon *tcon,
const __u16 netfid, const __u32 netpid, const __u64 len,
const __u64 offset, const __u32 numUnlock,
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 6a45a17..6600aa2 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -2320,6 +2320,46 @@ CIFSSMBWrite2(const int xid, struct cifs_io_parms *io_parms,
return rc;
}
+int cifs_lockv(const int xid, struct cifs_tcon *tcon, const __u16 netfid,
+ const __u8 lock_type, const __u32 num_unlock,
+ const __u32 num_lock, LOCKING_ANDX_RANGE *buf)
+{
+ int rc = 0;
+ LOCK_REQ *pSMB = NULL;
+ struct kvec iov[2];
+ int resp_buf_type;
+ __u16 count;
+
+ cFYI(1, "cifs_lockv num lock %d num unlock %d", num_lock, num_unlock);
+
+ rc = small_smb_init(SMB_COM_LOCKING_ANDX, 8, tcon, (void **) &pSMB);
+ if (rc)
+ return rc;
+
+ pSMB->Timeout = 0;
+ pSMB->NumberOfLocks = cpu_to_le16(num_lock);
+ pSMB->NumberOfUnlocks = cpu_to_le16(num_unlock);
+ pSMB->LockType = lock_type;
+ pSMB->AndXCommand = 0xFF; /* none */
+ pSMB->Fid = netfid; /* netfid stays le */
+
+ count = (num_unlock + num_lock) * sizeof(LOCKING_ANDX_RANGE);
+ inc_rfc1001_len(pSMB, count);
+ pSMB->ByteCount = cpu_to_le16(count);
+
+ iov[0].iov_base = (char *)pSMB;
+ iov[0].iov_len = be32_to_cpu(pSMB->hdr.smb_buf_length) + 4 -
+ (num_unlock + num_lock) * sizeof(LOCKING_ANDX_RANGE);
+ iov[1].iov_base = (char *)buf;
+ iov[1].iov_len = (num_unlock + num_lock) * sizeof(LOCKING_ANDX_RANGE);
+
+ cifs_stats_inc(&tcon->num_locks);
+ rc = SendReceive2(xid, tcon->ses, iov, 2, &resp_buf_type, CIFS_NO_RESP);
+ if (rc)
+ cFYI(1, "Send error in cifs_lockv = %d", rc);
+
+ return rc;
+}
int
CIFSSMBLock(const int xid, struct cifs_tcon *tcon,
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 805e2bd..569184e 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -1057,6 +1057,128 @@ cifs_getlk(struct file *file, struct file_lock *flock, __u8 type,
return rc;
}
+static void
+cifs_move_llist(struct list_head *source, struct list_head *dest)
+{
+ struct list_head *li, *tmp;
+ list_for_each_safe(li, tmp, source)
+ list_move(li, dest);
+}
+
+static void
+cifs_free_llist(struct list_head *llist)
+{
+ struct cifsLockInfo *li, *tmp;
+ list_for_each_entry_safe(li, tmp, llist, llist) {
+ cifs_del_lock_waiters(li);
+ list_del(&li->llist);
+ kfree(li);
+ }
+}
+
+static int
+cifs_unlock_range(struct cifsFileInfo *cfile, struct file_lock *flock, int xid)
+{
+ int rc = 0, stored_rc;
+ int types[] = {LOCKING_ANDX_LARGE_FILES,
+ LOCKING_ANDX_SHARED_LOCK | LOCKING_ANDX_LARGE_FILES};
+ unsigned int i;
+ unsigned int max_num, num;
+ LOCKING_ANDX_RANGE *buf, *cur;
+ struct cifs_tcon *tcon = tlink_tcon(cfile->tlink);
+ struct cifsInodeInfo *cinode = CIFS_I(cfile->dentry->d_inode);
+ struct cifsLockInfo *li, *tmp;
+ __u64 length = 1 + flock->fl_end - flock->fl_start;
+ struct list_head tmp_llist;
+
+ INIT_LIST_HEAD(&tmp_llist);
+
+ max_num = (tcon->ses->server->maxBuf - sizeof(struct smb_hdr)) /
+ sizeof(LOCKING_ANDX_RANGE);
+ buf = kzalloc(max_num * sizeof(LOCKING_ANDX_RANGE), GFP_KERNEL);
+ if (!buf)
+ return -ENOMEM;
+
+ mutex_lock(&cinode->lock_mutex);
+ for (i = 0; i < 2; i++) {
+ cur = buf;
+ num = 0;
+ list_for_each_entry_safe(li, tmp, &cinode->llist, llist) {
+ if (flock->fl_start > li->offset ||
+ (flock->fl_start + length) <
+ (li->offset + li->length))
+ continue;
+ if (current->tgid != li->pid)
+ continue;
+ if (cfile->netfid != li->netfid)
+ continue;
+ if (types[i] != li->type)
+ continue;
+ if (!cinode->can_cache_brlcks) {
+ cur->Pid = cpu_to_le16(li->pid);
+ cur->LengthLow = cpu_to_le32((u32)li->length);
+ cur->LengthHigh =
+ cpu_to_le32((u32)(li->length>>32));
+ cur->OffsetLow = cpu_to_le32((u32)li->offset);
+ cur->OffsetHigh =
+ cpu_to_le32((u32)(li->offset>>32));
+ /*
+ * We need to save a lock here to let us add
+ * it again to the inode list if the unlock
+ * range request fails on the server.
+ */
+ list_move(&li->llist, &tmp_llist);
+ if (++num == max_num) {
+ stored_rc = cifs_lockv(xid, tcon,
+ cfile->netfid,
+ li->type, num,
+ 0, buf);
+ if (stored_rc) {
+ /*
+ * We failed on the unlock range
+ * request - add all locks from
+ * the tmp list to the head of
+ * the inode list.
+ */
+ cifs_move_llist(&tmp_llist,
+ &cinode->llist);
+ rc = stored_rc;
+ } else
+ /*
+ * The unlock range request
+ * succeed - free the tmp list.
+ */
+ cifs_free_llist(&tmp_llist);
+ cur = buf;
+ num = 0;
+ } else
+ cur++;
+ } else {
+ /*
+ * We can cache brlock requests - simply remove
+ * a lock from the inode list.
+ */
+ list_del(&li->llist);
+ cifs_del_lock_waiters(li);
+ kfree(li);
+ }
+ }
+ if (num) {
+ stored_rc = cifs_lockv(xid, tcon, cfile->netfid,
+ types[i], num, 0, buf);
+ if (stored_rc) {
+ cifs_move_llist(&tmp_llist, &cinode->llist);
+ rc = stored_rc;
+ } else
+ cifs_free_llist(&tmp_llist);
+ }
+ }
+
+ mutex_unlock(&cinode->lock_mutex);
+ kfree(buf);
+ return rc;
+}
+
static int
cifs_setlk(struct file *file, struct file_lock *flock, __u8 type,
bool wait_flag, bool posix_lck, int lock, int unlock, int xid)
@@ -1104,43 +1226,9 @@ cifs_setlk(struct file *file, struct file_lock *flock, __u8 type,
rc = cifs_lock_add(cinode, length, flock->fl_start,
type, netfid);
}
- } else if (unlock) {
- /*
- * For each stored lock that this unlock overlaps completely,
- * unlock it.
- */
- int stored_rc = 0;
- struct cifsLockInfo *li, *tmp;
-
- mutex_lock(&cinode->lock_mutex);
- list_for_each_entry_safe(li, tmp, &cinode->llist, llist) {
- if (flock->fl_start > li->offset ||
- (flock->fl_start + length) <
- (li->offset + li->length))
- continue;
- if (current->tgid != li->pid)
- continue;
- if (cfile->netfid != li->netfid)
- continue;
-
- if (!cinode->can_cache_brlcks)
- stored_rc = CIFSSMBLock(xid, tcon, netfid,
- current->tgid,
- li->length, li->offset,
- 1, 0, li->type, 0, 0);
- else
- stored_rc = 0;
+ } else if (unlock)
+ rc = cifs_unlock_range(cfile, flock, xid);
- if (stored_rc)
- rc = stored_rc;
- else {
- list_del(&li->llist);
- cifs_del_lock_waiters(li);
- kfree(li);
- }
- }
- mutex_unlock(&cinode->lock_mutex);
- }
out:
if (flock->fl_flags & FL_POSIX)
posix_lock_file_wait(file, flock);
--
1.7.1
^ permalink raw reply related
* [v2 PATCH 2/4] CIFS: Implement caching mechanism for posix brlocks
From: Pavel Shilovsky @ 2011-10-22 11:33 UTC (permalink / raw)
To: linux-cifs-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1319283212-19024-1-git-send-email-piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org>
to handle all lock requests on the client in an exclusive oplock case.
Signed-off-by: Pavel Shilovsky <piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org>
---
fs/cifs/cifsproto.h | 4 +-
fs/cifs/cifssmb.c | 8 ++--
fs/cifs/file.c | 150 +++++++++++++++++++++++++++++++++++++++++++++++---
3 files changed, 147 insertions(+), 15 deletions(-)
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h
index c25d063..67c26cf 100644
--- a/fs/cifs/cifsproto.h
+++ b/fs/cifs/cifsproto.h
@@ -374,8 +374,8 @@ extern int CIFSSMBLock(const int xid, struct cifs_tcon *tcon,
const __u32 numLock, const __u8 lockType,
const bool waitFlag, const __u8 oplock_level);
extern int CIFSSMBPosixLock(const int xid, struct cifs_tcon *tcon,
- const __u16 smb_file_id, const int get_flag,
- const __u64 len, struct file_lock *,
+ const __u16 smb_file_id, const __u32 netpid,
+ const int get_flag, const __u64 len, struct file_lock *,
const __u16 lock_type, const bool waitFlag);
extern int CIFSSMBTDis(const int xid, struct cifs_tcon *tcon);
extern int CIFSSMBEcho(struct TCP_Server_Info *server);
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 4435b11..6a45a17 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -2393,9 +2393,9 @@ CIFSSMBLock(const int xid, struct cifs_tcon *tcon,
int
CIFSSMBPosixLock(const int xid, struct cifs_tcon *tcon,
- const __u16 smb_file_id, const int get_flag, const __u64 len,
- struct file_lock *pLockData, const __u16 lock_type,
- const bool waitFlag)
+ const __u16 smb_file_id, const __u32 netpid, const int get_flag,
+ const __u64 len, struct file_lock *pLockData,
+ const __u16 lock_type, const bool waitFlag)
{
struct smb_com_transaction2_sfi_req *pSMB = NULL;
struct smb_com_transaction2_sfi_rsp *pSMBr = NULL;
@@ -2453,7 +2453,7 @@ CIFSSMBPosixLock(const int xid, struct cifs_tcon *tcon,
} else
pSMB->Timeout = 0;
- parm_data->pid = cpu_to_le32(current->tgid);
+ parm_data->pid = cpu_to_le32(netpid);
parm_data->start = cpu_to_le64(pLockData->fl_start);
parm_data->length = cpu_to_le64(len); /* normalize negative numbers */
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 34cbbee..805e2bd 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -788,7 +788,42 @@ try_again:
}
static int
-cifs_push_locks(struct cifsFileInfo *cfile)
+cifs_posix_lock_test(struct file *file, struct file_lock *flock)
+{
+ int rc = 0;
+ struct cifsInodeInfo *cinode = CIFS_I(file->f_path.dentry->d_inode);
+ unsigned char saved_type = flock->fl_type;
+
+ mutex_lock(&cinode->lock_mutex);
+ posix_test_lock(file, flock);
+
+ if (flock->fl_type == F_UNLCK && !cinode->can_cache_brlcks) {
+ flock->fl_type = saved_type;
+ rc = 1;
+ }
+
+ mutex_unlock(&cinode->lock_mutex);
+ return rc;
+}
+
+static int
+cifs_posix_lock_set(struct file *file, struct file_lock *flock)
+{
+ struct cifsInodeInfo *cinode = CIFS_I(file->f_path.dentry->d_inode);
+ int rc;
+
+ mutex_lock(&cinode->lock_mutex);
+ if (!cinode->can_cache_brlcks) {
+ mutex_unlock(&cinode->lock_mutex);
+ return 1;
+ }
+ rc = posix_lock_file_wait(file, flock);
+ mutex_unlock(&cinode->lock_mutex);
+ return rc;
+}
+
+static int
+cifs_push_mandatory_locks(struct cifsFileInfo *cfile)
{
int xid, rc = 0, stored_rc;
struct cifsLockInfo *li, *tmp;
@@ -820,6 +855,91 @@ cifs_push_locks(struct cifsFileInfo *cfile)
return rc;
}
+/* copied from fs/locks.c with a name change */
+#define cifs_for_each_lock(inode, lockp) \
+ for (lockp = &inode->i_flock; *lockp != NULL; \
+ lockp = &(*lockp)->fl_next)
+
+static int
+cifs_push_posix_locks(struct cifsFileInfo *cfile)
+{
+ struct cifsInodeInfo *cinode = CIFS_I(cfile->dentry->d_inode);
+ struct cifs_tcon *tcon = tlink_tcon(cfile->tlink);
+ struct file_lock *flock, **before;
+ struct cifsLockInfo *lck, *tmp;
+ int rc = 0, xid, type;
+ __u64 length;
+ struct list_head locks_to_send;
+
+ xid = GetXid();
+
+ mutex_lock(&cinode->lock_mutex);
+ if (!cinode->can_cache_brlcks) {
+ mutex_unlock(&cinode->lock_mutex);
+ FreeXid(xid);
+ return rc;
+ }
+
+ INIT_LIST_HEAD(&locks_to_send);
+
+ lock_flocks();
+ cifs_for_each_lock(cfile->dentry->d_inode, before) {
+ flock = *before;
+ length = 1 + flock->fl_end - flock->fl_start;
+ if (flock->fl_type == F_RDLCK || flock->fl_type == F_SHLCK)
+ type = CIFS_RDLCK;
+ else
+ type = CIFS_WRLCK;
+
+ lck = cifs_lock_init(length, flock->fl_start, type,
+ cfile->netfid);
+ if (!lck) {
+ rc = -ENOMEM;
+ goto send_locks;
+ }
+ lck->pid = flock->fl_pid;
+
+ list_add_tail(&lck->llist, &locks_to_send);
+ }
+
+send_locks:
+ unlock_flocks();
+
+ list_for_each_entry_safe(lck, tmp, &locks_to_send, llist) {
+ struct file_lock tmp_lock;
+ int stored_rc;
+
+ tmp_lock.fl_start = lck->offset;
+ stored_rc = CIFSSMBPosixLock(xid, tcon, lck->netfid, lck->pid,
+ 0, lck->length, &tmp_lock,
+ lck->type, 0);
+ if (stored_rc)
+ rc = stored_rc;
+ list_del(&lck->llist);
+ kfree(lck);
+ }
+
+ cinode->can_cache_brlcks = false;
+ mutex_unlock(&cinode->lock_mutex);
+
+ FreeXid(xid);
+ return rc;
+}
+
+static int
+cifs_push_locks(struct cifsFileInfo *cfile)
+{
+ struct cifs_sb_info *cifs_sb = CIFS_SB(cfile->dentry->d_sb);
+ struct cifs_tcon *tcon = tlink_tcon(cfile->tlink);
+
+ if ((tcon->ses->capabilities & CAP_UNIX) &&
+ (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) &&
+ ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NOPOSIXBRL) == 0))
+ return cifs_push_posix_locks(cfile);
+
+ return cifs_push_mandatory_locks(cfile);
+}
+
static void
cifs_read_flock(struct file_lock *flock, __u8 *type, int *lock, int *unlock,
bool *wait_flag)
@@ -865,24 +985,30 @@ cifs_read_flock(struct file_lock *flock, __u8 *type, int *lock, int *unlock,
}
static int
-cifs_getlk(struct cifsFileInfo *cfile, struct file_lock *flock, __u8 type,
+cifs_getlk(struct file *file, struct file_lock *flock, __u8 type,
bool wait_flag, bool posix_lck, int xid)
{
int rc = 0;
__u64 length = 1 + flock->fl_end - flock->fl_start;
+ struct cifsFileInfo *cfile = (struct cifsFileInfo *)file->private_data;
+ struct cifs_tcon *tcon = tlink_tcon(cfile->tlink);
struct cifsInodeInfo *cinode = CIFS_I(cfile->dentry->d_inode);
__u16 netfid = cfile->netfid;
- struct cifs_tcon *tcon = tlink_tcon(cfile->tlink);
if (posix_lck) {
int posix_lock_type;
+
+ rc = cifs_posix_lock_test(file, flock);
+ if (!rc)
+ return rc;
+
if (type & LOCKING_ANDX_SHARED_LOCK)
posix_lock_type = CIFS_RDLCK;
else
posix_lock_type = CIFS_WRLCK;
- rc = CIFSSMBPosixLock(xid, tcon, netfid, 1 /* get */,
- length, flock, posix_lock_type,
- wait_flag);
+ rc = CIFSSMBPosixLock(xid, tcon, netfid, current->tgid,
+ 1 /* get */, length, flock,
+ posix_lock_type, wait_flag);
return rc;
}
@@ -944,6 +1070,11 @@ cifs_setlk(struct file *file, struct file_lock *flock, __u8 type,
if (posix_lck) {
int posix_lock_type;
+
+ rc = cifs_posix_lock_set(file, flock);
+ if (!rc || rc < 0)
+ return rc;
+
if (type & LOCKING_ANDX_SHARED_LOCK)
posix_lock_type = CIFS_RDLCK;
else
@@ -952,8 +1083,9 @@ cifs_setlk(struct file *file, struct file_lock *flock, __u8 type,
if (unlock == 1)
posix_lock_type = CIFS_UNLCK;
- rc = CIFSSMBPosixLock(xid, tcon, netfid, 0 /* set */, length,
- flock, posix_lock_type, wait_flag);
+ rc = CIFSSMBPosixLock(xid, tcon, netfid, current->tgid,
+ 0 /* set */, length, flock,
+ posix_lock_type, wait_flag);
goto out;
}
@@ -1052,7 +1184,7 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *flock)
* negative length which we can not accept over the wire.
*/
if (IS_GETLK(cmd)) {
- rc = cifs_getlk(cfile, flock, type, wait_flag, posix_lck, xid);
+ rc = cifs_getlk(file, flock, type, wait_flag, posix_lck, xid);
FreeXid(xid);
return rc;
}
--
1.7.1
^ permalink raw reply related
* [v2 PATCH 1/4] CIFS: Implement caching mechanism for mandatory brlocks
From: Pavel Shilovsky @ 2011-10-22 11:33 UTC (permalink / raw)
To: linux-cifs-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1319283212-19024-1-git-send-email-piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org>
If we have an oplock and negotiate mandatory locking style we handle
all brlock requests on the client.
Signed-off-by: Pavel Shilovsky <piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org>
---
fs/cifs/cifsglob.h | 2 +
fs/cifs/file.c | 206 +++++++++++++++++++++++++++++++++++++++++++++++++---
2 files changed, 197 insertions(+), 11 deletions(-)
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index d153d0b..8238aa1 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -496,6 +496,8 @@ extern struct cifs_tcon *cifs_sb_master_tcon(struct cifs_sb_info *cifs_sb);
*/
struct cifsLockInfo {
struct list_head llist; /* pointer to next cifsLockInfo */
+ struct list_head blist; /* pointer to locks blocked on this */
+ wait_queue_head_t block_q;
__u64 offset;
__u64 length;
__u32 pid;
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index a3b545f..34cbbee 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -275,11 +275,14 @@ cifs_new_fileinfo(__u16 fileHandle, struct file *file,
spin_unlock(&cifs_file_list_lock);
cifs_set_oplock_level(pCifsInode, oplock);
+ pCifsInode->can_cache_brlcks = pCifsInode->clientCanCacheAll;
file->private_data = pCifsFile;
return pCifsFile;
}
+static void cifs_del_lock_waiters(struct cifsLockInfo *lock);
+
/*
* Release a reference on the file private data. This may involve closing
* the filehandle out on the server. Must be called without holding
@@ -335,6 +338,7 @@ void cifsFileInfo_put(struct cifsFileInfo *cifs_file)
if (li->netfid != cifs_file->netfid)
continue;
list_del(&li->llist);
+ cifs_del_lock_waiters(li);
kfree(li);
}
mutex_unlock(&cifsi->lock_mutex);
@@ -640,24 +644,182 @@ int cifs_closedir(struct inode *inode, struct file *file)
return rc;
}
-static int store_file_lock(struct cifsInodeInfo *cinode, __u64 len,
- __u64 offset, __u8 type, __u16 netfid)
+static struct cifsLockInfo *
+cifs_lock_init(__u64 len, __u64 offset, __u8 type, __u16 netfid)
{
struct cifsLockInfo *li =
kmalloc(sizeof(struct cifsLockInfo), GFP_KERNEL);
- if (li == NULL)
- return -ENOMEM;
+ if (!li)
+ return li;
li->netfid = netfid;
li->offset = offset;
li->length = len;
li->type = type;
li->pid = current->tgid;
+ INIT_LIST_HEAD(&li->blist);
+ init_waitqueue_head(&li->block_q);
+ return li;
+}
+
+static void
+cifs_del_lock_waiters(struct cifsLockInfo *lock)
+{
+ struct cifsLockInfo *li, *tmp;
+ list_for_each_entry_safe(li, tmp, &lock->blist, blist) {
+ list_del_init(&li->blist);
+ wake_up(&li->block_q);
+ }
+}
+
+static bool
+cifs_find_lock_conflict(struct cifsInodeInfo *cinode, __u64 offset,
+ __u64 length, __u8 type, __u16 netfid,
+ struct cifsLockInfo **conf_lock)
+{
+ struct cifsLockInfo *li, *tmp;
+
+ list_for_each_entry_safe(li, tmp, &cinode->llist, llist) {
+ if (offset + length <= li->offset ||
+ offset >= li->offset + li->length)
+ continue;
+ else if ((type & LOCKING_ANDX_SHARED_LOCK) &&
+ ((netfid == li->netfid && current->tgid == li->pid) ||
+ type == li->type))
+ continue;
+ else {
+ *conf_lock = li;
+ return true;
+ }
+ }
+ return false;
+}
+
+static int
+cifs_lock_test(struct cifsInodeInfo *cinode, __u64 offset, __u64 length,
+ __u8 type, __u16 netfid, struct file_lock *flock)
+{
+ int rc = 0;
+ struct cifsLockInfo *conf_lock;
+ bool exist;
+
+ mutex_lock(&cinode->lock_mutex);
+
+ exist = cifs_find_lock_conflict(cinode, offset, length, type, netfid,
+ &conf_lock);
+ if (exist) {
+ flock->fl_start = conf_lock->offset;
+ flock->fl_end = conf_lock->offset + conf_lock->length - 1;
+ flock->fl_pid = conf_lock->pid;
+ if (conf_lock->type & LOCKING_ANDX_SHARED_LOCK)
+ flock->fl_type = F_RDLCK;
+ else
+ flock->fl_type = F_WRLCK;
+ } else if (!cinode->can_cache_brlcks)
+ rc = 1;
+ else
+ flock->fl_type = F_UNLCK;
+
+ mutex_unlock(&cinode->lock_mutex);
+ return rc;
+}
+
+static int
+cifs_lock_add(struct cifsInodeInfo *cinode, __u64 len, __u64 offset,
+ __u8 type, __u16 netfid)
+{
+ struct cifsLockInfo *li;
+
+ li = cifs_lock_init(len, offset, type, netfid);
+ if (!li)
+ return -ENOMEM;
+
mutex_lock(&cinode->lock_mutex);
list_add_tail(&li->llist, &cinode->llist);
mutex_unlock(&cinode->lock_mutex);
return 0;
}
+static int
+cifs_lock_add_if(struct cifsInodeInfo *cinode, __u64 offset, __u64 length,
+ __u8 type, __u16 netfid, bool wait)
+{
+ struct cifsLockInfo *lock, *conf_lock;
+ bool exist;
+ int rc = 0;
+
+ lock = cifs_lock_init(length, offset, type, netfid);
+ if (!lock)
+ return -ENOMEM;
+
+try_again:
+ exist = false;
+ mutex_lock(&cinode->lock_mutex);
+
+ exist = cifs_find_lock_conflict(cinode, offset, length, type, netfid,
+ &conf_lock);
+ if (!exist && cinode->can_cache_brlcks) {
+ list_add_tail(&lock->llist, &cinode->llist);
+ mutex_unlock(&cinode->lock_mutex);
+ return rc;
+ }
+
+ if (!exist)
+ rc = 1;
+ else if (!wait)
+ rc = -EACCES;
+ else {
+ list_add_tail(&lock->blist, &conf_lock->blist);
+ mutex_unlock(&cinode->lock_mutex);
+ rc = wait_event_interruptible(lock->block_q,
+ (lock->blist.prev == &lock->blist) &&
+ (lock->blist.next == &lock->blist));
+ if (!rc)
+ goto try_again;
+ else {
+ mutex_lock(&cinode->lock_mutex);
+ list_del_init(&lock->blist);
+ mutex_unlock(&cinode->lock_mutex);
+ }
+ }
+
+ kfree(lock);
+ mutex_unlock(&cinode->lock_mutex);
+ return rc;
+}
+
+static int
+cifs_push_locks(struct cifsFileInfo *cfile)
+{
+ int xid, rc = 0, stored_rc;
+ struct cifsLockInfo *li, *tmp;
+ struct cifs_tcon *tcon;
+ struct cifsInodeInfo *cinode = CIFS_I(cfile->dentry->d_inode);
+
+ xid = GetXid();
+ tcon = tlink_tcon(cfile->tlink);
+
+ mutex_lock(&cinode->lock_mutex);
+ if (!cinode->can_cache_brlcks) {
+ mutex_unlock(&cinode->lock_mutex);
+ FreeXid(xid);
+ return rc;
+ }
+
+ list_for_each_entry_safe(li, tmp, &cinode->llist, llist) {
+ stored_rc = CIFSSMBLock(xid, tcon, cfile->netfid,
+ li->pid, li->length, li->offset,
+ 0, 1, li->type, 0, 0);
+ if (stored_rc)
+ rc = stored_rc;
+ }
+
+ cinode->can_cache_brlcks = false;
+ mutex_unlock(&cinode->lock_mutex);
+
+ FreeXid(xid);
+ return rc;
+}
+
static void
cifs_read_flock(struct file_lock *flock, __u8 *type, int *lock, int *unlock,
bool *wait_flag)
@@ -708,6 +870,7 @@ cifs_getlk(struct cifsFileInfo *cfile, struct file_lock *flock, __u8 type,
{
int rc = 0;
__u64 length = 1 + flock->fl_end - flock->fl_start;
+ struct cifsInodeInfo *cinode = CIFS_I(cfile->dentry->d_inode);
__u16 netfid = cfile->netfid;
struct cifs_tcon *tcon = tlink_tcon(cfile->tlink);
@@ -723,6 +886,11 @@ cifs_getlk(struct cifsFileInfo *cfile, struct file_lock *flock, __u8 type,
return rc;
}
+ rc = cifs_lock_test(cinode, flock->fl_start, length, type, netfid,
+ flock);
+ if (!rc)
+ return rc;
+
/* BB we could chain these into one lock request BB */
rc = CIFSSMBLock(xid, tcon, netfid, current->tgid, length,
flock->fl_start, 0, 1, type, 0, 0);
@@ -790,12 +958,19 @@ cifs_setlk(struct file *file, struct file_lock *flock, __u8 type,
}
if (lock) {
+ rc = cifs_lock_add_if(cinode, flock->fl_start, length,
+ type, netfid, wait_flag);
+ if (rc < 0)
+ return rc;
+ else if (!rc)
+ goto out;
+
rc = CIFSSMBLock(xid, tcon, netfid, current->tgid, length,
- flock->fl_start, 0, lock, type, wait_flag, 0);
+ flock->fl_start, 0, 1, type, wait_flag, 0);
if (rc == 0) {
/* For Windows locks we must store them. */
- rc = store_file_lock(cinode, length, flock->fl_start,
- type, netfid);
+ rc = cifs_lock_add(cinode, length, flock->fl_start,
+ type, netfid);
}
} else if (unlock) {
/*
@@ -816,14 +991,19 @@ cifs_setlk(struct file *file, struct file_lock *flock, __u8 type,
if (cfile->netfid != li->netfid)
continue;
- stored_rc = CIFSSMBLock(xid, tcon, netfid,
- current->tgid, li->length,
- li->offset, 1, 0, li->type,
- 0, 0);
+ if (!cinode->can_cache_brlcks)
+ stored_rc = CIFSSMBLock(xid, tcon, netfid,
+ current->tgid,
+ li->length, li->offset,
+ 1, 0, li->type, 0, 0);
+ else
+ stored_rc = 0;
+
if (stored_rc)
rc = stored_rc;
else {
list_del(&li->llist);
+ cifs_del_lock_waiters(li);
kfree(li);
}
}
@@ -2404,6 +2584,10 @@ void cifs_oplock_break(struct work_struct *work)
cFYI(1, "Oplock flush inode %p rc %d", inode, rc);
}
+ rc = cifs_push_locks(cfile);
+ if (rc)
+ cERROR(1, "Push locks rc = %d", rc);
+
/*
* releasing stale oplock after recent reconnect of smb session using
* a now incorrect file handle is not a data integrity issue but do
--
1.7.1
^ permalink raw reply related
* [v2 PATCH 0/4] Implement byte-range lock caching
From: Pavel Shilovsky @ 2011-10-22 11:33 UTC (permalink / raw)
To: linux-cifs-u79uwXL29TY76Z2rM5mHXA
This is the rest of byte-range lock cache patchset that includes several fixes in patches #1 and #3.
The patchset is going to simplify brlocking code and add caching support for exclusive oplock cases. I splitted it into several independent parts - so, each can be applied separately once it's reviewed.
Any comments and testing are welcome!
Pavel Shilovsky (4):
CIFS: Implement caching mechanism for mandatory brlocks
CIFS: Implement caching mechanism for posix brlocks
CIFS: Send as many mandatory unlock ranges at once as possible
CIFS: Make cifs_push_locks send as many locks at once as possible
fs/cifs/cifsglob.h | 2 +
fs/cifs/cifsproto.h | 7 +-
fs/cifs/cifssmb.c | 48 +++++-
fs/cifs/file.c | 533 ++++++++++++++++++++++++++++++++++++++++++++++-----
4 files changed, 538 insertions(+), 52 deletions(-)
^ permalink raw reply
* Re: [Qemu-devel] [PATCH v3 0/6] MIPS64 user mode emulation in QEMU with Cavium specific instruction support
From: Andreas Färber @ 2011-10-22 11:21 UTC (permalink / raw)
To: khansa; +Cc: peter.maydell, riku.voipio, qemu-devel, aurelien
In-Reply-To: <1319278273-32437-1-git-send-email-khansa@kics.edu.pk>
Am 22.10.2011 12:11, schrieb khansa@kics.edu.pk:
> From: Khansa Butt <khansa@kics.edu.pk>
>
> This is the team work of Ehsan-ul-Haq, Abdul Qadeer, Abdul Waheed, Khansa Butt
> from HPCN Lab KICS UET Lahore.
>
> Sorry Richard! gen_set was missed.
When I say further description is missing, I mean: Please add at least
one sentence between From: and Signed-off-by: summarizing what changes
you are doing and why those are correct. This is very useful for
bisecting, git log and web interfaces.
And if you're fixing a bug, please describe what symptoms there were
(crash? wrong values? etc.) so that it can be verified and checked for
future regressions.
Remember, most of us are not too intimate with mips.
Andreas
> v1 contains:
> * SEQI and SEQ related changes specified by Richard Henderson
> * Fix issues related to coding style, typos and misleading comments
> * Cavium specific change in set_thread_area syscall has been removed
> * as it corresponds to modified libc and kernel.
^ permalink raw reply
* Re: [Qemu-devel] gcc auto-omit-frame-pointer vs msvc longjmp
From: Kai Tietz @ 2011-10-22 11:19 UTC (permalink / raw)
To: xunxun; +Cc: gcc, jojelino, qemu-devel
In-Reply-To: <4EA252C9.9060900@gmail.com>
2011/10/22 xunxun <xunxun1982@gmail.com>:
> 于 2011/10/22 13:13, xunxun 写道:
>>
>> Hi, all
>>
>> It seems that gcc's auto-omit-frame-pointer has other problems.
>>
>> The example is from mingw bug tracker:
>> http://sourceforge.net/tracker/?func=detail&aid=3426555&group_id=2435&atid=102435
>>
>> g++ -O3 main.cpp running will crash.
>> g++ -O2 main.cpp running no crash.
>> g++ -O3 -fno-omit-frame-pointer running no crash.
>>
>> I don't know in the end which optimize option defaultly contains this
>> switch "-fomit-frame-pointer" on i686-pc-mingw32 or x86_64-w64-mingw32?
>>
> It crashes on Win7.
Well, this issue isn't related to this thread. It is more related to
dw2 and SjLj used. For toolchains using dw2 exception mechanism, you
will see this crash. By using SjLj you won't (thanks for checking
this).
This shows indeed my strong concerns about dw2 exception mechanism for
32-bit Windows targets. The implementation depends too much on
code-patterns and is therefore a bit inconsitant. Secondly it causes
harm if you try to throw exceptions over VC generated code. So I
would strongly recomment to use the slower, but more reliable SjLj
throwing mechanism on Windows 32-bit.
Regards,
Kai
^ permalink raw reply
* Re: sec=krb5 mounts never return
From: Arno Schuring @ 2011-10-22 11:12 UTC (permalink / raw)
To: linux-nfs
In-Reply-To: <4EA1E793.3060407@anl.gov>
Douglas E. Engert (deengert@anl.gov on 2011-10-21 16:43 -0500):
> If the enctype=4 and length= 8 that sounds like DES.
> You may need to add to the krb5.conf file,
>
> allow_weak_crypto = yes
That's there. I'm not particularly happy about it, but it is my
understanding that 2.6.32 does not allow strong crypto for nfs4.
>
> On 10/21/2011 3:58 PM, Kevin Coffman wrote:
> >>
> >> In this case I'm trying with a local mount, so client==server. The
> >> gssd logs invariably end with the following lines:
> >> rpc.gssd[26133]: creating context with server nfs@genie.loos.site
> >> rpc.gssd[28189]: DEBUG: serialize_krb5_ctx: lucid version!
> >> rpc.gssd[28189]: prepare_krb5_rfc1964_buffer: serializing keys with
> >> enctype 4 and length 8
> >> rpc.gssd[28189]: doing downcall
> >> [ then nothing until I kill the mount process ]
> >>
> >> In the svcgssd logs, nothing stands out to me. It all appears
> >> proper to the untrained eye:
> >>
> >> rpc.svcgssd[26188]: handling null request
> >> rpc.svcgssd[26188]: sname = nfs/genie.loos.site@LOOS.SITE
> >> rpc.svcgssd[26188]: libnfsidmap: using (default) domain: loos.site
> >> rpc.svcgssd[26188]: DEBUG: serialize_krb5_ctx: lucid version!
> >> rpc.svcgssd[26188]: prepare_krb5_rfc1964_buffer: serializing keys
> >> with enctype 4 and length 8
> >> rpc.svcgssd[26188]: doing downcall
> >> rpc.svcgssd[26188]: mech: krb5, hndl len: 4, ctx len 85, timeout:
> >> 1319183270 (35999 from now), clnt: nfs@genie.loos.site, uid: -1,
> >> gid: -1, num aux grps: 0:
> >> rpc.svcgssd[26188]: sending null reply
> >> rpc.svcgssd[26188]: finished handling null request
> >>
> > The userland/daemon stuff all looks fine to me. I'm not as familiar
> > with the kernel logs. I believe the following kernel messages are
> > from the ^C:
> >
Indeed. 23:47 is the mount command, 23:48 is the ^C. I see I did not
even allow 30s before killing, but I've had similar results even when
waiting minutes.
> >
> > I don't see anything obviously wrong.
Thanks. Any kernel wizards that want to take a stab at this? I can
provide more input if required, but kernel traces are hard to get
because this is a NAS without console.
Regards,
Arno
^ permalink raw reply
* Re: [PATCH v2] CIFS: Fix DFS handling in cifs_get_file_info
From: Pavel Shilovsky @ 2011-10-22 11:12 UTC (permalink / raw)
To: Jeff Layton
Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA, stable-DgEjT+Ai2ygdnm+yROfE0A
In-Reply-To: <20111022070656.4eb6129c-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2011/10/22 Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>:
> I think this looks fine. Did you actually see a problem with this or
> did you notice it by inspection?
I caught it while working with SMB2 code - so, I didn't faced with any
real problem connected with it.
--
Best regards,
Pavel Shilovsky.
^ permalink raw reply
* [Bug 36934] screen corruption after running a game
From: bugzilla-daemon @ 2011-10-22 11:12 UTC (permalink / raw)
To: dri-devel
In-Reply-To: <bug-36934-502@http.bugs.freedesktop.org/>
https://bugs.freedesktop.org/show_bug.cgi?id=36934
--- Comment #13 from auxsvr@gmail.com 2011-10-22 04:12:01 PDT ---
Apparently, there are two kinds of corruption in my case.
The first one is triggered by display of large pixmaps or textures, and
manifests itself with corruption of fonts, menus, decorations, icons and
widgets all over the screen. It is easy to trigger this by scrolling quickly
through a PDF file in okular, or after running Google earth or a game. After
some tests for several hours, it appears that the cause is the Virtualbox
kernel modules. In fact, after removing them, I haven't been able to trigger
this type of corruption again.
The second one is the one manifested in Firefox with large pixmaps, described
in comment 9. If I open that image in Firefox and magnify it to 1:1, then it
appears black. Returning to the original magnification makes it appear partly
corrupted with the contents of other windows (I'm using kwin with compositing).
Opening and zooming the same image in Chrome does not exhibit the corruption. I
haven't found a way to resolve this yet.
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
^ permalink raw reply
* Re: [PATCH] Makefile: do not set setgid bit on directories on GNU/kFreeBSD
From: Jonathan Nieder @ 2011-10-22 11:11 UTC (permalink / raw)
To: Junio C Hamano
Cc: git, Alex Riesen, Christopher M. Fuhrman, Greg Troxel,
Stefan Sperling
In-Reply-To: <20111003064120.GA24396@elie>
(people cc-ed: your input would be welcome on [*] below. See commit
81a24b52, "Do not use GUID on dir in git init --shared=all on FreeBSD"
for context)
Hi Junio,
>From Documentation/RelNotes/1.7.7.1.txt:
* On some BSD systems, adding +s bit on directories is detrimental
(it is not necessary on BSD to begin with). The installation
procedure has been updated to take this into account.
I assume this is referring to 0b20dd8f (Makefile: do not set setgid
bit on directories on GNU/kFreeBSD, 2011-10-03), which admittedly
does have a subject line that suggests it would be about that (sorry
about that). The change was actually about "git init -s" which sets
the setgid bit on SysV-style systems to allow shared access to a
repository (and can provoke errors on BSD-style systems, depending on
how permissive the filesystem in use wants to be).
More to the point, the patch was just taking a fix that arrived for
FreeBSD in v1.5.5 days and making it also apply to machines using an
(obscure) GNU userland/FreeBSD kernel mixture.
By the way, maybe other BSD-style ports (NetBSD, OpenBSD) should be
setting DIR_HAS_BSD_GROUP_SEMANTICS to get this fix, too[*]? Then the
release notes could look something like this:
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
Documentation/RelNotes/1.7.7.1.txt | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git i/Documentation/RelNotes/1.7.7.1.txt w/Documentation/RelNotes/1.7.7.1.txt
index fecfac8a..e3c29ff0 100644
--- i/Documentation/RelNotes/1.7.7.1.txt
+++ w/Documentation/RelNotes/1.7.7.1.txt
@@ -5,8 +5,9 @@ Fixes since v1.7.7
------------------
* On some BSD systems, adding +s bit on directories is detrimental
- (it is not necessary on BSD to begin with). The installation
- procedure has been updated to take this into account.
+ (it is not necessary on BSD to begin with). "git init --shared"
+ has been updated to take this into account without extra makefile
+ settings on platforms the Makefile knows about.
* After incorrectly written third-party tools store a tag object in
HEAD, git diagnosed it as a repository corruption and refused to
--
^ permalink raw reply related
* [U-Boot] Web service Administrator
From: Heritage Funding Inc UK @ 2011-10-22 11:09 UTC (permalink / raw)
To: u-boot
You have reached the limit of your mailbox by your web mail service, you
are above your limit which is 20GB as set by your administrator, you are
currently running on 20.9GB, you may not be able to send or receive
emails. To Prevent this! Please click on the link below to upgrade your
Quota
https://docs.google.com/spreadsheet/viewform?hl=en_GB&pli=1&formkey=dHdOY3ZZYl9sbTdHalJvOVBfVFlMZEE6MQ#gid=0
Failure to do so will result in a limited access to your mailbox. Warning!
Reverence.
Web service Administrator
NOTICE: The information contained in this e-mail may be confidential and is
intended solely for the use of the named addressee. Access, copying or
re-use of the e-mail or any information contained herein by any other
person is not authorized. If you are not the intended recipient please
notify us immediately by returning the e-mail to the originator.
^ permalink raw reply
* Re: [PATCH v2] CIFS: Fix DFS handling in cifs_get_file_info
From: Jeff Layton @ 2011-10-22 11:06 UTC (permalink / raw)
To: Pavel Shilovsky
Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA, stable-DgEjT+Ai2ygdnm+yROfE0A
In-Reply-To: <1319279870-17657-1-git-send-email-piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org>
On Sat, 22 Oct 2011 14:37:50 +0400
Pavel Shilovsky <piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org> wrote:
> We should call cifs_all_info_to_fattr in rc == 0 case only.
>
> Cc: <stable-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Signed-off-by: Pavel Shilovsky <piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org>
> ---
> fs/cifs/inode.c | 19 ++++++++++++-------
> 1 files changed, 12 insertions(+), 7 deletions(-)
>
> diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
> index 663c4e3..2c50bd2 100644
> --- a/fs/cifs/inode.c
> +++ b/fs/cifs/inode.c
> @@ -562,7 +562,16 @@ int cifs_get_file_info(struct file *filp)
>
> xid = GetXid();
> rc = CIFSSMBQFileInfo(xid, tcon, cfile->netfid, &find_data);
> - if (rc == -EOPNOTSUPP || rc == -EINVAL) {
> + switch (rc) {
> + case 0:
> + cifs_all_info_to_fattr(&fattr, &find_data, cifs_sb, false);
> + break;
> + case -EREMOTE:
> + cifs_create_dfs_fattr(&fattr, inode->i_sb);
> + rc = 0;
> + break;
> + case -EOPNOTSUPP:
> + case -EINVAL:
> /*
> * FIXME: legacy server -- fall back to path-based call?
> * for now, just skip revalidating and mark inode for
> @@ -570,18 +579,14 @@ int cifs_get_file_info(struct file *filp)
> */
> rc = 0;
> CIFS_I(inode)->time = 0;
> + default:
> goto cgfi_exit;
> - } else if (rc == -EREMOTE) {
> - cifs_create_dfs_fattr(&fattr, inode->i_sb);
> - rc = 0;
> - } else if (rc)
> - goto cgfi_exit;
> + }
>
> /*
> * don't bother with SFU junk here -- just mark inode as needing
> * revalidation.
> */
> - cifs_all_info_to_fattr(&fattr, &find_data, cifs_sb, false);
> fattr.cf_uniqueid = CIFS_I(inode)->uniqueid;
> fattr.cf_flags |= CIFS_FATTR_NEED_REVAL;
> cifs_fattr_to_inode(inode, &fattr);
I think this looks fine. Did you actually see a problem with this or
did you notice it by inspection?
It doesn't seem like we'd ever hit the EREMOTE case here. If we have
a DFS referral, won't we typically get the EREMOTE during the QPathInfo
call (i.e. during the lookup) ?
Either way it's probably worthwhile to fix...
Reviewed-by: Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
^ permalink raw reply
* Re: Question on RHEL 6 support
From: Paolo Bonzini @ 2011-10-22 11:01 UTC (permalink / raw)
To: Pasi Kärkkäinen
Cc: Xen-devel@lists.xensource.com, Alok Sinha, Ian Campbell,
Stefano Stabellini
In-Reply-To: <20111021141407.GC12984@reaktio.net>
On 10/21/2011 04:14 PM, Pasi Kärkkäinen wrote:
>>> >> Try:
>>> >> xen_platform_pci=0
>> >
>> > That doesn't exist.
>> >
> Hmm, or is it:
> xen_platform_device=0
>
> Anyway there definitely is a configuration option for controlling the xen platform pci device,
> which can enable or disable PVHVM drivers.
>
> I can't just remember which one the option is called..
> (and I can't grep the sources right now.. travelling.)
It's xen_platform_pci, but it doesn't exist on either RHEL5 Xen or 3.4.
Paolo
^ permalink raw reply
* [Qemu-devel] [RFC] target-arm: Preserve CPUID over CPU reset
From: Andreas Färber @ 2011-10-22 11:00 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, Andreas Färber, Paul Brook
In-Reply-To: <CAFEAcA-Zzat7PUj3Mtefckz5XKEvhBSrd7cAjQv5KAopvj_+HQ@mail.gmail.com>
Previously the CPUID register was set in cpu_arm_init() based on -cpu
model. The CPU was then reset, requiring to save the CPUID and restore
it afterwards.
Change the storage location of c0_cpuid so that it does not get cleared.
OMAP appears to be special in that the CPUID can be switched between
TI915T and TI925T on write. Therefore preserve cpu_reset_model_id() in
slightly simplified form, allowing OMAP to reset the CPUID to TI925.
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Paul Brook <paul@codesourcery.com>
Cc: Andrzej Zaborowski <balrogg@gmail.com>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
---
hw/armv7m_nvic.c | 2 +-
target-arm/cpu.h | 4 ++--
target-arm/helper.c | 24 ++++++++++--------------
target-arm/machine.c | 4 ++--
4 files changed, 15 insertions(+), 19 deletions(-)
diff --git a/hw/armv7m_nvic.c b/hw/armv7m_nvic.c
index bf8c3c5..e029537 100644
--- a/hw/armv7m_nvic.c
+++ b/hw/armv7m_nvic.c
@@ -151,7 +151,7 @@ static uint32_t nvic_readl(void *opaque, uint32_t offset)
case 0x1c: /* SysTick Calibration Value. */
return 10000;
case 0xd00: /* CPUID Base. */
- return cpu_single_env->cp15.c0_cpuid;
+ return ARM_CPUID(cpu_single_env);
case 0xd04: /* Interrypt Control State. */
/* VECTACTIVE */
val = s->gic.running_irq[0];
diff --git a/target-arm/cpu.h b/target-arm/cpu.h
index 6ab780d..1623a2a 100644
--- a/target-arm/cpu.h
+++ b/target-arm/cpu.h
@@ -106,7 +106,6 @@ typedef struct CPUARMState {
/* System control coprocessor (cp15) */
struct {
- uint32_t c0_cpuid;
uint32_t c0_cachetype;
uint32_t c0_ccsid[16]; /* Cache size. */
uint32_t c0_clid; /* Cache level. */
@@ -228,6 +227,7 @@ typedef struct CPUARMState {
} cp[15];
void *nvic;
const struct arm_boot_info *boot_info;
+ uint32_t cp15_c0_cpuid;
} CPUARMState;
CPUARMState *cpu_arm_init(const char *cpu_model);
@@ -398,7 +398,7 @@ void cpu_arm_set_cp_io(CPUARMState *env, int cpnum,
conventional cores (ie. Application or Realtime profile). */
#define IS_M(env) arm_feature(env, ARM_FEATURE_M)
-#define ARM_CPUID(env) (env->cp15.c0_cpuid)
+#define ARM_CPUID(env) (env->cp15_c0_cpuid)
#define ARM_CPUID_ARM1026 0x4106a262
#define ARM_CPUID_ARM926 0x41069265
diff --git a/target-arm/helper.c b/target-arm/helper.c
index e2428eb..74e423d 100644
--- a/target-arm/helper.c
+++ b/target-arm/helper.c
@@ -48,10 +48,9 @@ static inline void set_feature(CPUARMState *env, int feature)
env->features |= 1u << feature;
}
-static void cpu_reset_model_id(CPUARMState *env, uint32_t id)
+static void cpu_reset_model_id(CPUARMState *env)
{
- env->cp15.c0_cpuid = id;
- switch (id) {
+ switch (env->cp15_c0_cpuid) {
case ARM_CPUID_ARM926:
set_feature(env, ARM_FEATURE_V4T);
set_feature(env, ARM_FEATURE_V5);
@@ -214,7 +213,7 @@ static void cpu_reset_model_id(CPUARMState *env, uint32_t id)
case ARM_CPUID_TI925T:
set_feature(env, ARM_FEATURE_V4T);
set_feature(env, ARM_FEATURE_OMAPCP);
- env->cp15.c0_cpuid = ARM_CPUID_TI925T; /* Depends on wiring. */
+ env->cp15_c0_cpuid = ARM_CPUID_TI925T; /* Depends on wiring. */
env->cp15.c0_cachetype = 0x5109149;
env->cp15.c1_sys = 0x00000070;
env->cp15.c15_i_max = 0x000;
@@ -253,7 +252,7 @@ static void cpu_reset_model_id(CPUARMState *env, uint32_t id)
env->cp15.c1_sys = 0x00000070;
break;
default:
- cpu_abort(env, "Bad CPU ID: %x\n", id);
+ cpu_abort(env, "Bad CPU ID: %x\n", env->cp15_c0_cpuid);
break;
}
@@ -265,17 +264,14 @@ static void cpu_reset_model_id(CPUARMState *env, uint32_t id)
void cpu_reset(CPUARMState *env)
{
- uint32_t id;
-
if (qemu_loglevel_mask(CPU_LOG_RESET)) {
qemu_log("CPU Reset (CPU %d)\n", env->cpu_index);
log_cpu_state(env, 0);
}
- id = env->cp15.c0_cpuid;
memset(env, 0, offsetof(CPUARMState, breakpoints));
- if (id)
- cpu_reset_model_id(env, id);
+ if (env->cp15_c0_cpuid)
+ cpu_reset_model_id(env);
#if defined (CONFIG_USER_ONLY)
env->uncached_cpsr = ARM_CPU_MODE_USR;
/* For user mode we must enable access to coprocessors */
@@ -311,7 +307,7 @@ void cpu_reset(CPUARMState *env)
/* v7 performance monitor control register: same implementor
* field as main ID register, and we implement no event counters.
*/
- env->cp15.c9_pmcr = (id & 0xff000000);
+ env->cp15.c9_pmcr = (env->cp15_c0_cpuid & 0xff000000);
#endif
set_flush_to_zero(1, &env->vfp.standard_fp_status);
set_flush_inputs_to_zero(1, &env->vfp.standard_fp_status);
@@ -392,7 +388,7 @@ CPUARMState *cpu_arm_init(const char *cpu_model)
}
env->cpu_model_str = cpu_model;
- env->cp15.c0_cpuid = id;
+ env->cp15_c0_cpuid = id;
cpu_reset(env);
if (arm_feature(env, ARM_FEATURE_NEON)) {
gdb_register_coprocessor(env, vfp_gdb_get_reg, vfp_gdb_set_reg,
@@ -1756,7 +1752,7 @@ void HELPER(set_cp15)(CPUState *env, uint32_t insn, uint32_t val)
break;
case 1: /* Set TI925T configuration. */
env->cp15.c15_ticonfig = val & 0xe7;
- env->cp15.c0_cpuid = (val & (1 << 5)) ? /* OS_TYPE bit */
+ env->cp15_c0_cpuid = (val & (1 << 5)) ? /* OS_TYPE bit */
ARM_CPUID_TI915T : ARM_CPUID_TI925T;
break;
case 2: /* Set I_max. */
@@ -1801,7 +1797,7 @@ uint32_t HELPER(get_cp15)(CPUState *env, uint32_t insn)
case 0:
switch (op2) {
case 0: /* Device ID. */
- return env->cp15.c0_cpuid;
+ return env->cp15_c0_cpuid;
case 1: /* Cache Type. */
return env->cp15.c0_cachetype;
case 2: /* TCM status. */
diff --git a/target-arm/machine.c b/target-arm/machine.c
index 7d4fc54..ed457a5 100644
--- a/target-arm/machine.c
+++ b/target-arm/machine.c
@@ -20,7 +20,7 @@ void cpu_save(QEMUFile *f, void *opaque)
qemu_put_be32(f, env->usr_regs[i]);
qemu_put_be32(f, env->fiq_regs[i]);
}
- qemu_put_be32(f, env->cp15.c0_cpuid);
+ qemu_put_be32(f, env->cp15_c0_cpuid);
qemu_put_be32(f, env->cp15.c0_cachetype);
qemu_put_be32(f, env->cp15.c0_cssel);
qemu_put_be32(f, env->cp15.c1_sys);
@@ -134,7 +134,7 @@ int cpu_load(QEMUFile *f, void *opaque, int version_id)
env->usr_regs[i] = qemu_get_be32(f);
env->fiq_regs[i] = qemu_get_be32(f);
}
- env->cp15.c0_cpuid = qemu_get_be32(f);
+ env->cp15_c0_cpuid = qemu_get_be32(f);
env->cp15.c0_cachetype = qemu_get_be32(f);
env->cp15.c0_cssel = qemu_get_be32(f);
env->cp15.c1_sys = qemu_get_be32(f);
--
1.7.7
^ permalink raw reply related
* Re: [PATCH 7/5] pretty: %G[?GS] placeholders
From: Elia Pinto @ 2011-10-22 10:47 UTC (permalink / raw)
To: Junio C Hamano, git
In-Reply-To: <7v7h3x7h6j.fsf_-_@alter.siamese.dyndns.org>
Can you suggest what do you think can be useful placeholders ? Thanks.
2011/10/22, Junio C Hamano <gitster@pobox.com>:
> Add new placeholders related to the GPG signature on signed commits.
>
> - %GG to show the raw verification message from GPG;
> - %G? to show either "G" for Good, "B" for Bad;
> - %GS to show the name of the signer.
>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
> * The 6th is the one that works with a bogus commit with NUL in it I sent
> out previously.
>
> This concludes the series; I'll leave the design and implementation of
> other useful placeholders to the list for now.
>
> pretty.c | 86
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 files changed, 86 insertions(+), 0 deletions(-)
>
> diff --git a/pretty.c b/pretty.c
> index f45eb54..392d656 100644
> --- a/pretty.c
> +++ b/pretty.c
> @@ -9,6 +9,7 @@
> #include "notes.h"
> #include "color.h"
> #include "reflog-walk.h"
> +#include "gpg-interface.h"
>
> static char *user_format;
> static struct cmt_fmt_map {
> @@ -640,6 +641,12 @@ struct format_commit_context {
> const struct pretty_print_context *pretty_ctx;
> unsigned commit_header_parsed:1;
> unsigned commit_message_parsed:1;
> + unsigned commit_signature_parsed:1;
> + struct {
> + char *gpg_output;
> + char good_bad;
> + char *signer;
> + } signature;
> char *message;
> size_t width, indent1, indent2;
>
> @@ -822,6 +829,59 @@ static void rewrap_message_tail(struct strbuf *sb,
> c->indent2 = new_indent2;
> }
>
> +static struct {
> + char result;
> + const char *check;
> +} signature_check[] = {
> + { 'G', ": Good signature from " },
> + { 'B', ": BAD signature from " },
> +};
> +
> +static void parse_signature_lines(struct format_commit_context *ctx)
> +{
> + const char *buf = ctx->signature.gpg_output;
> + int i;
> +
> + for (i = 0; i < ARRAY_SIZE(signature_check); i++) {
> + const char *found = strstr(buf, signature_check[i].check);
> + const char *next;
> + if (!found)
> + continue;
> + ctx->signature.good_bad = signature_check[i].result;
> + found += strlen(signature_check[i].check);
> + next = strchrnul(found, '\n');
> + ctx->signature.signer = xmemdupz(found, next - found);
> + break;
> + }
> +}
> +
> +static void parse_commit_signature(struct format_commit_context *ctx)
> +{
> + struct strbuf payload = STRBUF_INIT;
> + struct strbuf signature = STRBUF_INIT;
> + struct strbuf gpg_output = STRBUF_INIT;
> + int status;
> +
> + ctx->commit_signature_parsed = 1;
> +
> + if (parse_signed_commit(ctx->commit->object.sha1,
> + &payload, &signature) <= 0)
> + goto out;
> + status = verify_signed_buffer(payload.buf, payload.len,
> + signature.buf, signature.len,
> + &gpg_output);
> + if (status && !gpg_output.len)
> + goto out;
> + ctx->signature.gpg_output = strbuf_detach(&gpg_output, NULL);
> + parse_signature_lines(ctx);
> +
> + out:
> + strbuf_release(&gpg_output);
> + strbuf_release(&payload);
> + strbuf_release(&signature);
> +}
> +
> +
> static size_t format_commit_one(struct strbuf *sb, const char *placeholder,
> void *context)
> {
> @@ -974,6 +1034,30 @@ static size_t format_commit_one(struct strbuf *sb,
> const char *placeholder,
> return 0;
> }
>
> + if (placeholder[0] == 'G') {
> + if (!c->commit_signature_parsed)
> + parse_commit_signature(c);
> + switch (placeholder[1]) {
> + case 'G':
> + if (c->signature.gpg_output)
> + strbuf_addstr(sb, c->signature.gpg_output);
> + break;
> + case '?':
> + switch (c->signature.good_bad) {
> + case 'G':
> + case 'B':
> + strbuf_addch(sb, c->signature.good_bad);
> + }
> + break;
> + case 'S':
> + if (c->signature.signer)
> + strbuf_addstr(sb, c->signature.signer);
> + break;
> + }
> + return 2;
> + }
> +
> +
> /* For the rest we have to parse the commit header. */
> if (!c->commit_header_parsed)
> parse_commit_header(c);
> @@ -1114,6 +1198,8 @@ void format_commit_message(const struct commit
> *commit,
>
> if (context.message != commit->buffer)
> free(context.message);
> + free(context.signature.gpg_output);
> + free(context.signature.signer);
> }
>
> static void pp_header(const struct pretty_print_context *pp,
> --
> 1.7.7.555.g02edb3
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
Inviato dal mio dispositivo mobile
^ permalink raw reply
* Re: Profiling sleep times?
From: Frederic Weisbecker @ 2011-10-22 10:49 UTC (permalink / raw)
To: Arun Sharma
Cc: Peter Zijlstra, Ingo Molnar, avagin, linux-perf-users, acme,
Stephane Eranian
In-Reply-To: <4E9CD134.60106@fb.com>
On Mon, Oct 17, 2011 at 06:07:00PM -0700, Arun Sharma wrote:
> On 10/15/11 12:29 PM, Peter Zijlstra wrote:
> >On Sat, 2011-10-15 at 21:22 +0200, Peter Zijlstra wrote:
> >
> >>>Sleep time should really just be a different notion of 'cost of the
> >>>function/callchain' and fit into the existing scheme, right?
> >>
> >>The problem with andrew's patches is that it wrecks the callchain
> >>semantics. The waittime tracepoint is in the wakeup path (and hence
> >>generates the wakee's callchain) whereas they really want the callchain
> >>of the woken task to show where it spend time.
> >
> >We could of course try to move the tracepoint into the schedule path, so
> >we issue it the first time the task gets scheduled after the wakeup, but
> >I suspect that will just add more overhead, and we really could do
> >without that.
>
> Do we need to define new tracepoints? I suspect we could make the
> existing ones:
>
> trace_sched_stat_wait()
> trace_sched_stat_sleep()
>
> work for this purpose. The length of time the task was not on the
> cpu could then be computed as: sleep+wait. The downside is that the
> complexity moves to user space.
>
> perf record -e sched:sched_stat_sleep,sched:sched_stat_wait,...
>
> Re: changing the semantics of tracepoint callchains
>
> Yeah - this could be surprising. Luckily, most tracepoints retain
> their semantics, but a few special ones don't. I guess we just need
> to document the new behavior.
That's not only a problem of semantics although that alone is a problem,
people will seldom read the documentation for corner cases, we should
really stay consistant here: if remote callchains are really needed, we
want a specific interface for that, not abusing the existing one that would
only confuse people.
Now I still think doing remote callchains is asking for troubles: we need to
ensure the target is really sleeping and is not going to be scheduled
concurrently otherwise you might get weird or stale results. So the user needs
to know which tracepoints are safe to perform this.
Then comes the problem to deal with remote callchains in userspace: the event
comes from a task but the callchain is from another. You need the perf tools
to handle remote dsos/mapping/sym etc...
That's a lot of unnecessary complications.
I think we should use something like a perf report plugin: perhaps something
that can create a virtual event on top of real ones: compute the sched:sched_switch
events, find the time tasks are sleeping and create virtual sleep events on top
of that with a period weighted with the sleep time.
Just a thought.
^ permalink raw reply
* qemu-kvm crashes with linux 3.x
From: Hae-woo Park @ 2011-10-22 10:49 UTC (permalink / raw)
To: kvm
Hello.
I am Hae-woo Park, a user of kvm.
In these days, I cannot use kvm due to its bug.
( My kernel version is 3.0.0, but I also tried 3.1rc )
I think it is a kernel bug,
because my qemu-kvm is working with linux-2.6.32.
( I use Debian testing distribution. )
When I start kvm, I get the following message.
My qemu-kvm version is 0.14.1.
( When I tried qemu-kvm 0.15.1, it just crashes with a segmentation fault. )
-------
kvm_create_vm: Device or resource busy
Could not initialize KVM, will disable KVM support
kvm_set_phys_mem: error unregistering overlapping slot: Invalid argument
Aborted
-------
The kvm modules seem well loaded.
-------
Module Size Used by
kvm_amd 46898 0
kvm 228179 1 kvm_amd
dmesg:
[ 3.958082] kvm: Nested Virtualization enabled
[ 3.958085] kvm: Nested Paging enabled
-------
When executing kvm, dmesg presents a simple message:
[ 225.730117] kvm: enabling virtualization on CPU0 failed
And my /proc/cpuinfo is shown as follows:
-------
processor : 0
vendor_id : AuthenticAMD
cpu family : 16
model : 2
model name : AMD Athlon(tm) 7750 Dual-Core Processor
stepping : 3
cpu MHz : 2700.000
cache size : 512 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat
pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp
lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc extd_apicid pni
monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a
misalignsse 3dnowprefetch osvw ibs npt lbrv svm_lock
bogomips : 5439.31
TLB size : 1024 4K pages
clflush size : 64
cache_alignment : 64
address sizes : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate
processor : 1
vendor_id : AuthenticAMD
cpu family : 16
model : 2
model name : AMD Athlon(tm) 7750 Dual-Core Processor
stepping : 3
cpu MHz : 2700.000
cache size : 512 KB
physical id : 0
siblings : 2
core id : 1
cpu cores : 2
apicid : 1
initial apicid : 1
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat
pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp
lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc extd_apicid pni
monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a
misalignsse 3dnowprefetch osvw ibs npt lbrv svm_lock
bogomips : 5440.41
TLB size : 1024 4K pages
clflush size : 64
cache_alignment : 64
address sizes : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate
-------
There is one who suffers from a similar problem in Ubuntu Forum;
http://ubuntuforums.org/showthread.php?t=1773187
But there isn't any detailed info.
How can I handle this bug ?
Please help me.
Thank you.
Regards,
Hae-woo Park.
^ permalink raw reply
* [linux-lvm] unable to create mirror in LVM using lvconvert
From: sabari G @ 2011-10-22 10:45 UTC (permalink / raw)
To: linux-lvm
[-- Attachment #1: Type: text/plain, Size: 461 bytes --]
Dear Friends,
when i try to create mirror for already existing logical
volume i am getting error as follow .please help me to resolve this problem
.
my current LVM setup as follow
pv----/dev/hda9=1GB
/dev/hda10=!GB
vg--vgnew=2GB
lv-/dev/vgnew/lvol1,/dev/vgnew/lvol2,/dev/vgnew/lvol3,/dev/vgnew/lvol4,
each = 200MB
when i try to
lvconvert -m 1 vgnew/lvol4
"not enough free pv for creating parallel allocation.."
Regards,
Sabarinath G
[-- Attachment #2: Type: text/html, Size: 1153 bytes --]
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.