public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
* question about ext4/inode.c
@ 2009-11-02 16:10 Julia Lawall
  2009-11-02 17:48 ` Eric Sandeen
  0 siblings, 1 reply; 2+ messages in thread
From: Julia Lawall @ 2009-11-02 16:10 UTC (permalink / raw)
  To: tytso, adilger, linux-ext4

The function ext4_da_writepages_trans_blocks contains the following code:

        if (!(inode->i_flags & EXT4_EXTENTS_FL) &&
            (max_blocks > EXT4_MAX_TRANS_DATA))
                max_blocks = EXT4_MAX_TRANS_DATA;


Elsewhere the constant EXT4_EXTENTS_FL is used as follows:

EXT4_I(inode)->i_flags & EXT4_EXTENTS_FL

Should that be done in ext4_da_writepages_trans_blocks as well?

thanks,
julia

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

* Re: question about ext4/inode.c
  2009-11-02 16:10 question about ext4/inode.c Julia Lawall
@ 2009-11-02 17:48 ` Eric Sandeen
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Sandeen @ 2009-11-02 17:48 UTC (permalink / raw)
  To: Julia Lawall; +Cc: linux-ext4, Mingming Cao

Julia Lawall wrote:
> The function ext4_da_writepages_trans_blocks contains the following code:
> 
>         if (!(inode->i_flags & EXT4_EXTENTS_FL) &&
>             (max_blocks > EXT4_MAX_TRANS_DATA))
>                 max_blocks = EXT4_MAX_TRANS_DATA;
> 
> 
> Elsewhere the constant EXT4_EXTENTS_FL is used as follows:
> 
> EXT4_I(inode)->i_flags & EXT4_EXTENTS_FL
> 
> Should that be done in ext4_da_writepages_trans_blocks as well?
> 
> thanks,
> julia

Ouch, yes, looks like a bug.  I don't think that value would ever be set 
on the vfs inode's i_flags so we're always going down that path.

It's probably not catastrophic; if I'm reading it right we are just 
being more conservative all the time.

Want to send a patch? :)

-Eric

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

end of thread, other threads:[~2009-11-02 17:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-02 16:10 question about ext4/inode.c Julia Lawall
2009-11-02 17:48 ` Eric Sandeen

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