public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* TAKE 970240 - kill BMAPI_DEVICE
@ 2007-09-13  4:34 donaldd
  2007-09-13 19:23 ` Bhagi rathi
  0 siblings, 1 reply; 3+ messages in thread
From: donaldd @ 2007-09-13  4:34 UTC (permalink / raw)
  To: xfs, sgi.bugs.xfs

kill BMAPI_DEVICE

There is no reason to go into the iomap machinery just to get the
right block device for an inode.  Instead look at the realtime flag
in the inode and grab the right device from the mount structure.

I created a new helper, xfs_find_bdev_for_inode instead of opencoding
it because I plan to use it in other places in the future.


Signed-off-by: Christoph Hellwig <hch@lst.de>

Date:  Thu Sep 13 14:33:42 AEST 2007
Workarea:  linuxbuild.melbourne.sgi.com:/home/donaldd/isms/2.6.x-xfs
Inspected by:  hch@lst.de

The following file(s) were checked into:
  longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb


Modid:  xfs-linux-melb:xfs-kern:29680a
fs/xfs/xfs_iomap.h - 1.11 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_iomap.h.diff?r1=text&tr1=1.11&r2=text&tr2=1.10&f=h
	- kill BMAPI_DEVICE

fs/xfs/xfs_iomap.c - 1.55 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_iomap.c.diff?r1=text&tr1=1.55&r2=text&tr2=1.54&f=h
	- kill BMAPI_DEVICE

fs/xfs/linux-2.6/xfs_aops.c - 1.154 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_aops.c.diff?r1=text&tr1=1.154&r2=text&tr2=1.153&f=h
	- kill BMAPI_DEVICE

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: TAKE 970240 - kill BMAPI_DEVICE
  2007-09-13  4:34 TAKE 970240 - kill BMAPI_DEVICE donaldd
@ 2007-09-13 19:23 ` Bhagi rathi
  2007-09-13 20:30   ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: Bhagi rathi @ 2007-09-13 19:23 UTC (permalink / raw)
  To: donaldd@sgi.com; +Cc: xfs, sgi.bugs.xfs

Can one of you let me know the process of submitting changes?

Problem: Real time flag set on a regular file can race with directio which
can lead to
              incorrect real time device for iomap in xfs_vm_direct_IO. This
can happen
              only on the first I/O to the file as we don't set real time
flag if any of
              the extents or delayed blocks present.

Fix:

  xfs_setattr() {
          ...
          if (!(mask & XFS_AT_SIZE)) {
                 if (need_io_lock && vap->va_xflags & XFS_XFLAG_REALTIME)
                        lock_flags |= XFS_IOLOCK_EXCL;
                 .....
          }
         ...
 }


-Thanks,
 Saradhi.


On 9/13/07, donaldd@sgi.com <donaldd@sgi.com> wrote:
>
> kill BMAPI_DEVICE
>
> There is no reason to go into the iomap machinery just to get the
> right block device for an inode.  Instead look at the realtime flag
> in the inode and grab the right device from the mount structure.
>
> I created a new helper, xfs_find_bdev_for_inode instead of opencoding
> it because I plan to use it in other places in the future.
>
>
> Signed-off-by: Christoph Hellwig <hch@lst.de >
>
> Date:  Thu Sep 13 14:33:42 AEST 2007
> Workarea:  linuxbuild.melbourne.sgi.com:/home/donaldd/isms/2.6.x-xfs
> Inspected by:  hch@lst.de
>
> The following file(s) were checked into:
>   longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb
>
>
> Modid:  xfs-linux-melb:xfs-kern:29680a
> fs/xfs/xfs_iomap.h - 1.11 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/> xfs_iomap.h.diff?r1=text&tr1=1.11&r2=text&tr2=1.10&f=h
>
> http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_iomap.h.diff?r1=text&tr1=1.11&r2=text&tr2=1.10&f=h
>         - kill BMAPI_DEVICE
>
> fs/xfs/xfs_iomap.c - 1.55 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/> xfs_iomap.c.diff?r1=text&tr1=1.55&r2=text&tr2=1.54&f=h
>
> http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_iomap.c.diff?r1=text&tr1=1.55&r2=text&tr2=1.54&f=h
>         - kill BMAPI_DEVICE
>
> fs/xfs/linux-2.6/xfs_aops.c - 1.154 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/> linux-2.6/xfs_aops.c.diff?r1=text&tr1=1.154&r2=text&tr2=1.153&f=h
>
> http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_aops.c.diff?r1=text&tr1=1.154&r2=text&tr2=1.153&f=h
>         - kill BMAPI_DEVICE
>
>
>
>


[[HTML alternate version deleted]]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: TAKE 970240 - kill BMAPI_DEVICE
  2007-09-13 19:23 ` Bhagi rathi
@ 2007-09-13 20:30   ` Christoph Hellwig
  0 siblings, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2007-09-13 20:30 UTC (permalink / raw)
  To: Bhagi rathi; +Cc: donaldd@sgi.com, xfs, sgi.bugs.xfs

On Fri, Sep 14, 2007 at 12:53:20AM +0530, Bhagi rathi wrote:
> Can one of you let me know the process of submitting changes?

Just send a unified diff (using diff -u) to the list.

> 
> Problem: Real time flag set on a regular file can race with directio which
> can lead to
>               incorrect real time device for iomap in xfs_vm_direct_IO. This
> can happen
>               only on the first I/O to the file as we don't set real time
> flag if any of
>               the extents or delayed blocks present.
> 
> Fix:
> 
>   xfs_setattr() {
>           ...
>           if (!(mask & XFS_AT_SIZE)) {
>                  if (need_io_lock && vap->va_xflags & XFS_XFLAG_REALTIME)
>                         lock_flags |= XFS_IOLOCK_EXCL;
>                  .....
>           }

I have a patch queued up aswell, although it's after a reorganization of
the code to not clutter xfs_setattr even more.  If you want to send out
the fix now please go ahead.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-09-13 20:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-13  4:34 TAKE 970240 - kill BMAPI_DEVICE donaldd
2007-09-13 19:23 ` Bhagi rathi
2007-09-13 20:30   ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox