Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Feb 2017 19:37:13 +0300
From:      Slawa Olhovchenkov <slw@zxy.spb.ru>
To:        Steven Hartland <killing@multiplay.co.uk>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: ZFS: mkdir: File too large
Message-ID:  <20170202163713.GF26493@zxy.spb.ru>
In-Reply-To: <20170202162937.GE26493@zxy.spb.ru>
References:  <20170202115304.GA26493@zxy.spb.ru> <20170202142455.GB26493@zxy.spb.ru> <dc16880e-17e6-3eb7-b11c-0170bace688c@multiplay.co.uk> <20170202162937.GE26493@zxy.spb.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Feb 02, 2017 at 07:29:37PM +0300, Slawa Olhovchenkov wrote:

> On Thu, Feb 02, 2017 at 03:58:30PM +0000, Steven Hartland wrote:
> 
> > On 02/02/2017 14:24, Slawa Olhovchenkov wrote:
> > >> Try tracing SET_ERROR for EFBIG with dtrace to determine underlying
> > >> cause.
> > >    0  37281                   none:set-error set-error 27
> > >                zfs.ko`zfs_freebsd_mkdir+0x3a3
> > >                kernel`VOP_MKDIR_APV+0x8a
> > >                kernel`kern_mkdirat+0x1e1
> > >                kernel`amd64_syscall+0x50e
> > >                kernel`0xffffffff8079499b
> > >
> > > (kgdb) x zfs_freebsd_mkdir+0x3a3
> > > 0xffffffff81171813 <zfs_freebsd_mkdir+931>:     0xb4b78b45
> > > Current language:  auto; currently minimal
> > > (kgdb) info line *0xffffffff81171813
> > > Line 2145 of "/usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c" starts at address 0xffffffff81171813 <zfs_freebsd_mkdir+931> and ends at 0xffffffff8117181a <zfs_freebsd_mkdir+938>.
> > >
> > >    2138          /*
> > >    2139           * Add a new entry to the directory.
> > >    2140           */
> > >    2141          getnewvnode_reserve(1);
> > >    2142          tx = dmu_tx_create(zfsvfs->z_os);
> > >    2143          dmu_tx_hold_zap(tx, dzp->z_id, TRUE, dirname);
> > >    2144          dmu_tx_hold_zap(tx, DMU_NEW_OBJECT, FALSE, NULL);
> > >    2145          fuid_dirtied = zfsvfs->z_fuid_dirty;
> > >    2146          if (fuid_dirtied)
> > >    2147                  zfs_fuid_txhold(zfsvfs, tx);
> > >    2148          if (!zfsvfs->z_use_sa && acl_ids.z_aclp->z_acl_bytes > ZFS_ACE_SPACE) {
> > >    2149                  dmu_tx_hold_write(tx, DMU_NEW_OBJECT, 0,
> > >    2150                      acl_ids.z_aclp->z_acl_bytes);
> > >    2151          }
> > >
> > > PS: Please, CC me
> > Having a cursory look I'm going to guess ->
> > zfs_freebsd_mkdir
> > dmu_tx_assign
> > dmu_tx_try_assign
> > dmu_tx_count_write
> >          if (txh->txh_space_towrite + txh->txh_space_tooverwrite >
> >              2 * DMU_MAX_ACCESS)
> >                  err = SET_ERROR(EFBIG);
> 
> 
> zfs_freebsd_mkdir
> dmu_tx_hold_zap(tx, DMU_NEW_OBJECT, FALSE, NULL);
> dmu_tx_count_write
>   return err = EFBIG
> 
> Not sure about check
> txh->txh_space_towrite/txh->txh_space_tooverwrite:

Ah, check it now:
  1  28010         dmu_tx_count_write:entry err 0 txh_space_towrite 114688 txh_space_tooverwrite 0
  1  28011        dmu_tx_count_write:return err 27 txh_space_towrite 79020032 txh_space_tooverwrite 0

yes, this is relay > 2 * DMU_MAX_ACCESS.  

> dtrace: failed to compile script /mnt/big.d: line 30: printf( )
> argument #3 is incompatible with conversion #2 prototype:
>         conversion: %d
>          prototype: char, short, int, long, or long long
>           argument: refcount_t
> 
> out:
>         if (refcount_count(&txh->txh_space_towrite) +
>             refcount_count(&txh->txh_space_tooverwrite) >
>             2 * DMU_MAX_ACCESS)
>                 err = SET_ERROR(EFBIG);
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170202163713.GF26493>