X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fptlrpc%2Fnrs_tbf.c;h=63c7b3852429e0d8539f9d3307ba7d80537dd021;hp=50ddbf4b2e70eee48ebdd1800aa316a1f07a8f16;hb=e8f81877a33017a6bfd7d6e75c5a8b1fc336f347;hpb=617134bd0528ae04f9290ce20863fc955235762f diff --git a/lustre/ptlrpc/nrs_tbf.c b/lustre/ptlrpc/nrs_tbf.c index 50ddbf4..63c7b38 100644 --- a/lustre/ptlrpc/nrs_tbf.c +++ b/lustre/ptlrpc/nrs_tbf.c @@ -1579,6 +1579,14 @@ ptlrpc_lprocfs_nrs_tbf_rule_seq_show(struct seq_file *m, void *data) false, m); if (rc == 0) { /** + * -ENOSPC means buf in the parameter m is overflow, return 0 + * here to let upper layer function seq_read alloc a larger + * memory area and do this process again. + */ + } else if (rc == -ENOSPC) { + return 0; + + /** * Ignore -ENODEV as the regular NRS head's policy may be in the * ptlrpc_nrs_pol_state::NRS_POL_STATE_STOPPED state. */ @@ -1596,11 +1604,12 @@ ptlrpc_lprocfs_nrs_tbf_rule_seq_show(struct seq_file *m, void *data) false, m); if (rc == 0) { /** - * Ignore -ENODEV as the high priority NRS head's policy may be - * in the ptlrpc_nrs_pol_state::NRS_POL_STATE_STOPPED state. + * -ENOSPC means buf in the parameter m is overflow, return 0 + * here to let upper layer function seq_read alloc a larger + * memory area and do this process again. */ - } else if (rc != -ENODEV) { - return rc; + } else if (rc == -ENOSPC) { + return 0; } no_hp: