+
+ /*
+ * Update the saved dataset flags for the inode accordingly if failed.
+ */
+ if (!rc && !*cached) {
+ /*
+ * Currently auto attach strategy for a PCC backend is
+ * unchangeable once once it was added into the PCC datasets on
+ * a client as the support to change auto attach strategy is
+ * not implemented yet.
+ */
+ /*
+ * If tried to attach from one PCC backend:
+ * @lli_pcc_generation > 0:
+ * 1) The file was once attached into PCC, but now the
+ * corresponding PCC backend should be removed from the client;
+ * 2) The layout generation was changed, the data has been
+ * restored;
+ * 3) The corresponding PCC copy is not existed on PCC
+ * @lli_pcc_generation == 0:
+ * The file is never attached into PCC but in a HSM released
+ * state, or once attached into PCC but the inode was evicted
+ * from icache later.
+ * Set the saved dataset flags with PCC_DATASET_NONE. Then this
+ * file will skip from the candidates to try auto attach until
+ * the file is attached into PCC again.
+ *
+ * If the file was never attached into PCC, or once attached but
+ * its inode was evicted from icache (lli_pcc_generation == 0),
+ * or the corresponding dataset was removed from the client,
+ * set the saved dataset flags with PCC_DATASET_NONE.
+ *
+ * TODO: If the file was once attached into PCC but not try to
+ * auto attach due to the change of the configuration parameters
+ * for this dataset (i.e. change from auto attach enabled to
+ * auto attach disabled for this dataset), update the saved
+ * dataset flags with the found one.
+ */
+ lli->lli_pcc_dsflags = PCC_DATASET_NONE;
+ }