Details

    • Bug
    • Resolution: Fixed
    • Critical
    • Lustre 2.8.0
    • Lustre 2.7.0
    • 3
    • 9223372036854775807

    Description

      According to the existing code, I can guess that cl_client_cache->ccc_lru needs spin_lock when being referred but the below code looks violating the rule.

      osc_lru_reclaim
      long osc_lru_reclaim(struct client_obd *cli)
      {
              struct cl_env_nest nest;
              struct lu_env *env;
              struct cl_client_cache *cache = cli->cl_cache;
              long rc = 0;
              int max_scans;
              ENTRY;
      
              LASSERT(cache != NULL);
              LASSERT(!list_empty(&cache->ccc_lru)); <--- HERE
      
              .....
      
              spin_lock(&cache->ccc_lru_lock);
                                        <---- The LASSERT should be here, isn't it ?
              cache->ccc_lru_shrinkers++;
      
              ....
      

      Actually I sometimes see LBUG in osc_lru_reclaim when running multiple WRITEs in the same time. So I'm convinced this LASSERT should be moved to the locked section, or the LASSERT can touch ccc_lru while the other is doing linked list operation on ccc_lru.

      Attachments

        Activity

          People

            jay Jinshan Xiong (Inactive)
            nozaki Hiroya Nozaki (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: