[Top] [All Lists]

Re: [PATCH V4] reduce bmv_count in xfs_vn_fiemap

To: Eric Sandeen <sandeen@xxxxxxxxxxx>
Subject: Re: [PATCH V4] reduce bmv_count in xfs_vn_fiemap
From: Olaf Weber <olaf@xxxxxxx>
Date: Mon, 27 Jul 2009 09:55:56 +0200
Cc: xfs mailing list <xfs@xxxxxxxxxxx>, Felix Blyakher <felixb@xxxxxxx>
In-reply-to: <4A6D1651.5010102@xxxxxxxxxxx> (Eric Sandeen's message of "Sun, 26 Jul 2009 21:52:01 -0500")
References: <4A5E2F01.7030107@xxxxxxxxxxx> <bzybpnkhp62.fsf@xxxxxxxxxxxxxxxxxxxx> <4A5F3DBA.9040005@xxxxxxxxxxx> <4A5F7B7B.6020903@xxxxxxxxxxx> <4A6D1651.5010102@xxxxxxxxxxx>
User-agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4.3 (irix)
Eric Sandeen writes:

> commit 6321e3ed2acf3ee9643cdd403e1c88605d7944ba caused
> the full bmv_count's worth of getbmapx structures to get
> allocated; telling it to do MAXEXTNUM was a bit insane,
> resulting in ENOMEM every time.

> Chop it down to something reasonable, the number of slots
> in the caller's input buffer.  If this is too large the 
> caller may get ENOMEM but the reason should not be a
> mystery, and they can try again with something smaller.

> We add 1 to the value because in the normal getbmap
> world, bmv_count includes the header and xfs_getbmap does:

>         nex = bmv->bmv_count - 1;
>         if (nex <= 0)
>                 return XFS_ERROR(EINVAL);

> Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxxx>

Reviewed-By: Olaf Weber <olaf@xxxxxxx>



Olaf Weber                 SGI               Phone:  +31(0)30-6696752
                           Veldzigt 2b       Fax:    +31(0)30-6696799
Technical Lead             3454 PW de Meern  Vnet:   955-7151
Storage Software           The Netherlands   Email:  olaf@xxxxxxx

<Prev in Thread] Current Thread [Next in Thread>