Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-4973

MDD does not check nlink maximum limit properly, and cause LBUG in OSD layer(osd_handler.c:2805:osd_object_ref_add()) ASSERTION( inode->i_nlink <= 65000 )

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • Lustre 2.6.0
    • Lustre 2.6.0, Lustre 2.5.1
    • None
    • 3
    • 13786

    Description

      We did not check nlink properly in MDD layer
      [5/30/14, 12:32:08 PM] Andreas Dilger: # touch /mnt/testfs/foo; mkdir /mnt/testfs/d0

      1. ./createmany -l /mnt/testfs/foo /mnt/testfs/d0/f 80000
      • created 10000 (time 1401478106.75 total 17.33 last 17.33)
      • created 20000 (time 1401478117.97 total 28.54 last 11.22)
      • created 30000 (time 1401478128.66 total 39.24 last 10.70)
      • created 40000 (time 1401478139.82 total 50.40 last 11.16)
      • created 50000 (time 1401478150.49 total 61.07 last 10.67)
      • created 60000 (time 1401478161.25 total 71.83 last 10.76)

      Message from syslogd@sookie-gig at May 30 13:29:26 ...
      kernel:LustreError: 26342:0:(osd_handler.c:2805:osd_object_ref_add()) ASSERTION( inode->i_nlink <= 65000 ) failed:
      [5/30/14, 12:32:26 PM] Andreas Dilger: so we do check, just not in a robust manner...
      [5/30/14, 12:32:46 PM] wangdi: yes, we do not check it properly in MDD layer
      [5/30/14, 12:33:42 PM] wangdi: also in 2.4 and 2.5 I think

      Attachments

        Issue Links

          Activity

            [LU-4973] MDD does not check nlink maximum limit properly, and cause LBUG in OSD layer(osd_handler.c:2805:osd_object_ref_add()) ASSERTION( inode->i_nlink <= 65000 )
            adilger Andreas Dilger made changes -
            Link New: This issue is related to LU-4705 [ LU-4705 ]
            jlevi Jodi Levi (Inactive) made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: Open [ 1 ] New: Resolved [ 5 ]
            adilger Andreas Dilger made changes -
            Summary Original: MDD does not check nlink maxim limit properly, and cause LBUG in OSD layer(osd_handler.c:2805:osd_object_ref_add()) ASSERTION( inode->i_nlink <= 65000 ) New: MDD does not check nlink maximum limit properly, and cause LBUG in OSD layer(osd_handler.c:2805:osd_object_ref_add()) ASSERTION( inode->i_nlink <= 65000 )
            di.wang Di Wang (Inactive) made changes -
            Assignee Original: Andreas Dilger [ adilger ] New: Di Wang [ di.wang ]
            di.wang Di Wang (Inactive) made changes -
            Summary Original: MDD does not check nlink maxim limit properly, and cause LBUG in OSD layer New: MDD does not check nlink maxim limit properly, and cause LBUG in OSD layer(osd_handler.c:2805:osd_object_ref_add()) ASSERTION( inode->i_nlink <= 65000 )
            di.wang Di Wang (Inactive) made changes -
            Summary Original: in __mdd_may_link, it should check non-dir file New: MDD does not check nlink maxim limit properly, and cause LBUG in OSD layer
            di.wang Di Wang (Inactive) made changes -
            Description Original: seems brought in by http://review.whamcloud.com/6897
            {noformat}
            static int __mdd_may_link(const struct lu_env *env, struct mdd_object *obj,
                                      const struct lu_attr *la)
            {
                    struct mdd_device *m = mdd_obj2mdd_dev(obj);
                    ENTRY;

                    LASSERT(la != NULL);

                    if (!S_ISDIR(la->la_mode)) <------- we should return S_ISDIR instead of !S_ISDIR.
                            RETURN(0);

                    /*
                     * Subdir count limitation can be broken through.
                     */
                    if (la->la_nlink >= m->mdd_dt_conf.ddp_max_nlink)
                            RETURN(-EMLINK);
                    else
                            RETURN(0);
            }
            {noformat}
            New: We did not check nlink properly in MDD layer
            [5/30/14, 12:32:08 PM] Andreas Dilger: # touch /mnt/testfs/foo; mkdir /mnt/testfs/d0
            # ./createmany -l /mnt/testfs/foo /mnt/testfs/d0/f 80000
             - created 10000 (time 1401478106.75 total 17.33 last 17.33)
             - created 20000 (time 1401478117.97 total 28.54 last 11.22)
             - created 30000 (time 1401478128.66 total 39.24 last 10.70)
             - created 40000 (time 1401478139.82 total 50.40 last 11.16)
             - created 50000 (time 1401478150.49 total 61.07 last 10.67)
             - created 60000 (time 1401478161.25 total 71.83 last 10.76)

            Message from syslogd@sookie-gig at May 30 13:29:26 ...
             kernel:LustreError: 26342:0:(osd_handler.c:2805:osd_object_ref_add()) ASSERTION( inode->i_nlink <= 65000 ) failed:
            [5/30/14, 12:32:26 PM] Andreas Dilger: so we do check, just not in a robust manner...
            [5/30/14, 12:32:46 PM] wangdi: yes, we do not check it properly in MDD layer
            [5/30/14, 12:33:42 PM] wangdi: also in 2.4 and 2.5 I think
            pjones Peter Jones made changes -
            Assignee Original: WC Triage [ wc-triage ] New: Andreas Dilger [ adilger ]
            jlevi Jodi Levi (Inactive) made changes -
            Fix Version/s New: Lustre 2.6.0 [ 10595 ]
            di.wang Di Wang (Inactive) made changes -
            Affects Version/s New: Lustre 2.5.1 [ 10608 ]
            Affects Version/s New: Lustre 2.6.0 [ 10595 ]

            People

              di.wang Di Wang (Inactive)
              di.wang Di Wang (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: