1. 03 9月, 2009 1 次提交
    • A
      xfs: xfs_showargs() reports group *and* project quotas enabled · 988abe40
      Alex Elder 提交于
      If you enable group or project quotas on an XFS file system, then the
      mount table presented through /proc/self/mounts erroneously shows
      that both options are in effect for the file system.  The root of
      the problem is some bad logic in the xfs_showargs() function, which
      is used to format the file system type-specific options in effect
      for a file system.
      
      The problem originated in this GIT commit:
          Move platform specific mount option parse out of core XFS code
          Date: 11/22/07
          Author: Dave Chinner
          SHA1 ID: a67d7c5f
      
      For XFS quotas, project and group quota management are mutually
      exclusive--only one can be in effect at a time.  There are two
      parts to managing quotas:  aggregating usage information; and
      enforcing limits.  It is possible to have a quota in effect
      (aggregating usage) but not enforced.
      
      These features are recorded on an XFS mount point using these flags:
          XFS_PQUOTA_ACCT - Project quotas are aggregated
          XFS_GQUOTA_ACCT - Group quotas are aggregated
          XFS_OQUOTA_ENFD - Project/group quotas are enforced
      
      The code in error is in fs/xfs/linux-2.6/xfs_super.c:
      
              if (mp->m_qflags & (XFS_PQUOTA_ACCT|XFS_OQUOTA_ENFD))
                      seq_puts(m, "," MNTOPT_PRJQUOTA);
              else if (mp->m_qflags & XFS_PQUOTA_ACCT)
                      seq_puts(m, "," MNTOPT_PQUOTANOENF);
      
              if (mp->m_qflags & (XFS_GQUOTA_ACCT|XFS_OQUOTA_ENFD))
                      seq_puts(m, "," MNTOPT_GRPQUOTA);
              else if (mp->m_qflags & XFS_GQUOTA_ACCT)
                      seq_puts(m, "," MNTOPT_GQUOTANOENF);
      
      The problem is that XFS_OQUOTA_ENFD will be set in mp->m_qflags
      if either group or project quotas are enforced, and as a result
      both MNTOPT_PRJQUOTA and MNTOPT_GRPQUOTA will be shown as mount
      options.
      Signed-off-by: NAlex Elder <aelder@sgi.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NFelix Blyakher <felixb@sgi.com>
      988abe40
  2. 02 9月, 2009 11 次提交
  3. 01 9月, 2009 5 次提交
  4. 18 8月, 2009 1 次提交
    • C
      xfs: fix locking in xfs_iget_cache_hit · a022fe09
      Christoph Hellwig 提交于
      The locking in xfs_iget_cache_hit currently has numerous problems:
      
       - we clear the reclaim tag without i_flags_lock which protects
         modifications to it
       - we call inode_init_always which can sleep with pag_ici_lock
         held (this is oss.sgi.com BZ #819)
       - we acquire and drop i_flags_lock a lot and thus provide no
         consistency between the various flags we set/clear under it
      
      This patch fixes all that with a major revamp of the locking in
      the function.  The new version acquires i_flags_lock early and
      only drops it once we need to call into inode_init_always or before
      calling xfs_ilock.
      
      This patch fixes a bug seen in the wild where we race modifying the
      reclaim tag.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NFelix Blyakher <felixb@sgi.com>
      Reviewed-by: NEric Sandeen <sandeen@sandeen.net>
      Signed-off-by: NFelix Blyakher <felixb@sgi.com>
      a022fe09
  5. 17 8月, 2009 1 次提交
    • C
      xfs: fix locking in xfs_iget_cache_hit · bc990f5c
      Christoph Hellwig 提交于
      The locking in xfs_iget_cache_hit currently has numerous problems:
      
       - we clear the reclaim tag without i_flags_lock which protects
         modifications to it
       - we call inode_init_always which can sleep with pag_ici_lock
         held (this is oss.sgi.com BZ #819)
       - we acquire and drop i_flags_lock a lot and thus provide no
         consistency between the various flags we set/clear under it
      
      This patch fixes all that with a major revamp of the locking in
      the function.  The new version acquires i_flags_lock early and
      only drops it once we need to call into inode_init_always or before
      calling xfs_ilock.
      
      This patch fixes a bug seen in the wild where we race modifying the
      reclaim tag.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NFelix Blyakher <felixb@sgi.com>
      Reviewed-by: NEric Sandeen <sandeen@sandeen.net>
      Signed-off-by: NFelix Blyakher <felixb@sgi.com>
      bc990f5c
  6. 16 8月, 2009 2 次提交
  7. 15 8月, 2009 1 次提交
  8. 14 8月, 2009 18 次提交
    • L
      Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 · 3011c7f0
      Linus Torvalds 提交于
      * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (38 commits)
        V4L/DVB (12441): siano: read buffer overflow
        V4L/DVB (12440): Use kzalloc for frontend states to have struct dvb_frontend properly
        V4L/DVB (12438): Read buffer overflow
        V4L/DVB (12437): dvb: siano uses/depends on INPUT
        V4L/DVB (12436): stk-webcam: read buffer overflow
        V4L/DVB (12432): em28xx: fix regression in Empire DualTV digital tuning
        V4L/DVB (12429): v4l2-ioctl: fix G_STD and G_PARM default handlers
        V4L/DVB (12428): hdpvr: add missing initialization of current_norm
        V4L/DVB (12424): soc-camera: fix recursive locking in .buf_queue()
        V4L/DVB (12422): media/zr364xx: fix build errors
        V4L/DVB (12405): em28xx-cards: move register 0x13 setting to the proper place
        V4L/DVB (12411): em28xx: Fix artifacts with Silvercrest webcam
        V4L/DVB (12410): em28xx: Move the non-board dependent part to be outside em28xx_pre_card_setup()
        V4L/DVB (12407): em28xx: Adjust Silvercrest xtal frequency
        V4L/DVB (12406): em28xx: fix: don't do image interlacing on webcams
        V4L/DVB (12403): em28xx: properly reports some em2710 chips
        V4L/DVB (12402): em28xx: fix: some em2710 chips use a different vendor ID
        V4L/DVB (12401): m9v011: add vflip/hflip controls to control mirror/upside down
        V4L/DVB (12400): em28xx: Allow changing fps on webcams
        V4L/DVB (12399): mt9v011: Add support for controlling frame rates
        ...
      3011c7f0
    • S
      GFS2: Fix permissions on "recover" file · d7e623da
      Steven Whitehouse 提交于
      Although this file is only ever written and not read by
      userspace, it seems that the utils are opening this
      file O_RDWR, so we need to allow that.
      
      Also fixes the whitespace which seemed to be broken.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      Cc: David Teigland <teigland@redhat.com>
      d7e623da
    • R
      V4L/DVB (12441): siano: read buffer overflow · 08b39642
      Roel Kluin 提交于
      With mode DEVICE_MODE_RAW_TUNER a read occurs past the end of smscore_fw_lkup[].
      Subsequently an attempt is made to load the firmware from the resulting
      filename.
      Signed-off-by: NRoel Kluin <roel.kluin@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NDouglas Schilling Landgraf <dougsland@redhat.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      08b39642
    • M
      V4L/DVB (12440): Use kzalloc for frontend states to have struct dvb_frontend properly · 084e24ac
      Matthias Schwarzott 提交于
      This patch changes most frontend drivers to allocate their state structure via
      kzalloc and not kmalloc. This is done to properly initialize the
      embedded "struct dvb_frontend frontend" field, that they all have.
      
      The visible effect of this struct being uninitalized is, that the member "id"
      that is used to set the name of kernel thread is totally random.
      
      Some board drivers (for example cx88-dvb) set this "id" via
      videobuf_dvb_alloc_frontend but most do not.
      
      So I at least get random id values for saa7134, flexcop and ttpci based cards.
      It looks like this in dmesg:
      DVB: registering adapter 1 frontend -10551321 (ST STV0299 DVB-S)
      
      The related kernel thread then also gets a strange name
      like "kdvb-ad-1-fe--1".
      
      Cc: Michael Krufky <mkrufky@linuxtv.org>
      Cc: Steven Toth <stoth@linuxtv.org>
      Cc: Timothy Lee <timothy.lee@siriushk.com>
      Cc: Igor M. Liplianin <liplianin@me.by>
      Signed-off-by: NMatthias Schwarzott <zzam@gentoo.org>
      Acked-by: NAndreas Oberritter <obi@linuxtv.org>
      Signed-off-by: NDouglas Schilling Landgraf <dougsland@redhat.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      084e24ac
    • R
      V4L/DVB (12438): Read buffer overflow · bb2b4542
      Roel Kluin 提交于
      parport[n] is checked before n < MAX_CAMS
      Signed-off-by: NRoel Kluin <roel.kluin@gmail.com>
      Signed-off-by: NDouglas Schilling Landgraf <dougsland@redhat.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      bb2b4542
    • R
      V4L/DVB (12437): dvb: siano uses/depends on INPUT · 27059b35
      Randy Dunlap 提交于
      siano uses input_*() functions so it should depend on INPUT
      to prevent build errors:
      
      ERROR: "input_event" [drivers/media/dvb/siano/sms1xxx.ko] undefined!
      ERROR: "input_register_device" [drivers/media/dvb/siano/sms1xxx.ko] undefined!
      ERROR: "input_free_device" [drivers/media/dvb/siano/sms1xxx.ko] undefined!
      ERROR: "input_unregister_device" [drivers/media/dvb/siano/sms1xxx.ko] undefined!
      ERROR: "input_allocate_device" [drivers/media/dvb/siano/sms1xxx.ko] undefined!
      
      Cc: Michael Krufky <mkrufky@linuxtv.org>
      Cc: Uri Shkolnik <uris@siano-ms.com>
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NDouglas Schilling Landgraf <dougsland@redhat.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      27059b35
    • R
      V4L/DVB (12436): stk-webcam: read buffer overflow · 77f2c2db
      Roel Kluin 提交于
      It tested the value of stk_sizes[i].m before checking whether i was in range.
      
      Cc: Hans Verkuil <hverkuil@xs4all.nl>
      Cc: Trent Piepho <xyzzy@speakeasy.org>
      Signed-off-by: NRoel Kluin <roel.kluin@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NDouglas Schilling Landgraf <dougsland@redhat.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      77f2c2db
    • D
      V4L/DVB (12432): em28xx: fix regression in Empire DualTV digital tuning · 01a5fd6f
      Devin Heitmueller 提交于
      Restore support for digital tuning caused by regression during introduction
      of disable_i2c_gate parameter to zl10353 driver.
      
      Thanks to user "Xwang" for reporting the problem and testing the fix
      
      Cc: Xwang <xwang1976@email.it>
      Signed-off-by: NDevin Heitmueller <dheitmueller@kernellabs.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      01a5fd6f
    • H
      V4L/DVB (12429): v4l2-ioctl: fix G_STD and G_PARM default handlers · 9bedc7f7
      Hans Verkuil 提交于
      The v4l core supplies default handlers for G_STD and G_PARM. However, both
      default handlers are buggy.
      
      This patch fixes the following:
      
      1) If no g_std is supplied and current_norm == 0, then this driver does not
         support TV video standards (e.g. a radio or webcam driver). Return
         -EINVAL. This ensures that there is no bogus VIDIOC_G_STD support for
         such drivers.
      
      2) The default VIDIOC_G_PARM handler used current_norm instead of first
         checking if the driver supported g_std and calling that to get the norm.
         It also didn't check if current_norm was 0, since in that case the driver
         does not support TV standards (or no standard was set at all) and the
         default handler should return -EINVAL.
      
      Note that I am very unhappy with these default handlers: I think they
      basically behave like some very strange and unexpected side-effect.
      Signed-off-by: NHans Verkuil <hverkuil@xs4all.nl>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      9bedc7f7
    • H
      V4L/DVB (12428): hdpvr: add missing initialization of current_norm · 99362e1e
      Hans Verkuil 提交于
      Drivers should either set current_norm or supply a g_std callback.
      
      The hdpvr driver does neither. Since it initializes to a 60 Hz format
      I've initialized the current_norm to NTSC | PAL_M | PAL_60 which is the
      60 Hz subset of tvnorms.
      
      Cc: Janne Grunau <j@jannau.net>
      Signed-off-by: NHans Verkuil <hverkuil@xs4all.nl>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      99362e1e
    • G
      V4L/DVB (12424): soc-camera: fix recursive locking in .buf_queue() · 2dd54a54
      Guennadi Liakhovetski 提交于
      The .buf_queue() V4L2 driver method is called under
      spinlock_irqsave(q->irqlock,...), don't take the lock again inside the
      function.
      Reported-by: NAntonio Ospite <ospite@studenti.unina.it>
      Signed-off-by: NGuennadi Liakhovetski <g.liakhovetski@gmx.de>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      2dd54a54
    • R
      V4L/DVB (12422): media/zr364xx: fix build errors · 7d2e2e35
      Randy Dunlap 提交于
      Fix build errors in zr364xx by adding selects:
      
      zr364xx.c:(.text+0x195ed7): undefined reference to `videobuf_streamon'
      zr364xx.c:(.text+0x196030): undefined reference to `videobuf_dqbuf'
      zr364xx.c:(.text+0x1960c4): undefined reference to `videobuf_qbuf'
      zr364xx.c:(.text+0x196123): undefined reference to `videobuf_querybuf'
      zr364xx.c:(.text+0x196182): undefined reference to `videobuf_reqbufs'
      zr364xx.c:(.text+0x196224): undefined reference to `videobuf_queue_is_busy'
      zr364xx.c:(.text+0x196390): undefined reference to `videobuf_vmalloc_free'
      zr364xx.c:(.text+0x196571): undefined reference to `videobuf_iolock'
      zr364xx.c:(.text+0x196678): undefined reference to `videobuf_mmap_mapper'
      zr364xx.c:(.text+0x196760): undefined reference to `videobuf_poll_stream'
      zr364xx.c:(.text+0x19689a): undefined reference to `videobuf_read_one'
      zr364xx.c:(.text+0x1969ec): undefined reference to `videobuf_mmap_free'
      zr364xx.c:(.text+0x197862): undefined reference to `videobuf_queue_vmalloc_init'
      zr364xx.c:(.text+0x197a28): undefined reference to `videobuf_streamoff'
      zr364xx.c:(.text+0x198203): undefined reference to `videobuf_to_vmalloc'
      zr364xx.c:(.text+0x198603): undefined reference to `videobuf_streamoff'
      drivers/built-in.o: In function `free_buffer':
      zr364xx.c:(.text+0x19930c): undefined reference to `videobuf_vmalloc_free'
      drivers/built-in.o: In function `zr364xx_open':
      zr364xx.c:(.text+0x19a7de): undefined reference to `videobuf_queue_vmalloc_init'
      drivers/built-in.o: In function `read_pipe_completion':
      zr364xx.c:(.text+0x19b17f): undefined reference to `videobuf_to_vmalloc'
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NDouglas Schilling Landgraf <dougsland@redhat.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      7d2e2e35
    • M
      V4L/DVB (12405): em28xx-cards: move register 0x13 setting to the proper place · d7612c86
      Mauro Carvalho Chehab 提交于
      Register 0x13 seems to be a sort of image control, maybe gamma, white
      level or black level. Lower values produce better images, while higher
      values increases the contrast and shifts colors to green. 0xff produces
      a black image. This register is not Silvercrest-specific, so its code
      should be moved to a better place.
      
      If this register is left alone, a random value can be found at the
      register, producing weird results.
      
      While here, let's remove register 0x0d, as it had no noticed effect at
      the image.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      d7612c86
    • M
      V4L/DVB (12411): em28xx: Fix artifacts with Silvercrest webcam · 3d3215c4
      Mauro Carvalho Chehab 提交于
      Silvercrest mt9v011 sensor produces a 640x480 image. However,
      previously, the code were getting only half of the lines and merging two
      consecutive frames to "produce" a 640x480 image.
      
      With the addition of progressive mode, now em28xx is working with a full
      image. However, when the number of lines is bigger than 240, the
      beginning of some odd lines are filled with blank.
      
      After lots of testing, and physically checking the device for a Xtal, it
      was noticed experimentally that mt9v011 is using em28xx XCLK as its
      clock. Due to that, changing XCLK value changes the maximum speed of the
      stream.
      
      At the tests, it were possible to produce up to 32 fps, using a 30 MHz
      XCLK. However, at that rate, the artifacts happen even at 320x240. Lower
      values of XCLK produces artifacts only at 640x480.
      
      At some values of xclk (for example XCLKK = 6 MHz, 640x480), it is
      possible to see an invalid sucession of artifacts with this pattern:
      
      .xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      ..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      ...xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      ....xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      .xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      ..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      ...xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      ....xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      
      (where the dots represent the blanked pixels)
      
      So, it seems that a waveform in the format of a ramp is interferring at
      the image.
      
      The cause of this interference is currently unknown. Some possibilities
      are:
      	- electrical interference (maybe this device is broken?);
      	- some issue at mt9v011 programming;
      	- some bug at em28xx chip.
      
      So, for now, let's be conservative and use a value of XCLK that we know
      for sure that it won't cause artifacts.
      
      As I'm waiting for more of such devices with different em28xx chipset
      revisions, I'll have the opportunity to double check the issue with
      other pieces of hardware.
      
      Later patches can vary XCLK depending on the vertical resolutions, if a
      proper fix is not discovered.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      3d3215c4
    • M
      V4L/DVB (12410): em28xx: Move the non-board dependent part to be outside em28xx_pre_card_setup() · fcd20e3c
      Mauro Carvalho Chehab 提交于
      em28xx_pre_card_setup() is meant to contain board-specific initialization. Also,
      as autodetection sometimes occur only after having i2c bus enabled, this
      function may need to be called later.
      
      Moving those setups to happen outside the function avoids calling it twice without
      need and without duplicating output lines at dmesg.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      fcd20e3c
    • M
      V4L/DVB (12407): em28xx: Adjust Silvercrest xtal frequency · 970cff36
      Mauro Carvalho Chehab 提交于
      We don't know the xtal frequency of Silvercrest, but we need to have
      some value in order to allow controlling the frame rate frequency. The
      value is probably still wrong, since the manufacturer announces this
      device as being capable of 30fps, but the maximum we can get is
      13.5 fps.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      970cff36
    • M
      V4L/DVB (12406): em28xx: fix: don't do image interlacing on webcams · c2a6b54a
      Mauro Carvalho Chehab 提交于
      Due to historical reasons, em28xx driver gets two consecutive frames and
      fold them into an unique framing, doing interlacing. While this works
      fine for TV images, this produces two bad effects with webcams:
      
      1) webcam images are progressive. Merging two consecutive images produce
      interlacing artifacts on the image;
      
      2) since the driver needs to get two frames, it reduces the maximum
      frame rate by two.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      c2a6b54a
    • M
      V4L/DVB (12403): em28xx: properly reports some em2710 chips · d594317b
      Mauro Carvalho Chehab 提交于
      As reported by hermann pitton <hermann-pitton@arcor.de>, some devices
      has a different chip id for em2710 (likely the older ones):
      
      em28xx: New device @ 480 Mbps (eb1a:2710, interface 0, class 0)
      em28xx #0: Identified as EM2710/EM2750/EM2751 webcam grabber (card=22)
      em28xx #0: em28xx chip ID = 17
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      d594317b